Name Migration: Build the deprecation-warning 'main' binary every time #8404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
To help with tutorials and other situations, we will now always build the deprecation-warning
main
binaries to alert users when they are using an outdated filename.Previously, this was only being built if a legacy
main
binary was detected in the build folder, and now we will build it every time.Detailed Explanation
This PR attempts to better-resolve the issues that @gpacix raised in #8397. Some of the name-migration pain has already been mitigated through #8257 and #8283, and this PR attempts to build on the good things in those PRs and take care of some additional edge cases.
#8257 ensured that legacy binaries were removed when
make clean
is run.#8283 added friendly deprecation-warning binaries to alert users if they were attempting to run a binary that was no longer supported.
However, to keep from cluttering up the build space, we only built these deprecation-warning binaries when a previously detected binary is present. In hindsight, we maybe shouldn't have been so cautious.
As pointed out in #8397, it is very easy for users to follow tutorial instructions, and run into a bit of a brick wall when they attempt to
make
and run./main
and nothing is present.This PR removes the makefile's filename check for the
main
target only, so that the deprecation-warningmain
target is always built, and it always outputs the name migration warning message to the build log.Hopefully both of these things combines will help users who are following outdated tutorials (even if they're 3rd party tutorials that we are not able to update) and get them back on the right track with minimal hassle.