Add rustc version check to build script #2733
Merged
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.
This extends the build script with a few version checks, as a first step towards autopublishing.
As it is right now, the current checks will stop the compilation if the used rust version is older than the one specified in
min_version.txt
or if stable or beta were used to compile Clippy.min_version.txt
contains the output ofrustc -vV
as that's currently the only format thatrustc-version-rs
understands. It was the quickest way to get it working, without writing a custom rust version parser.I committed the min_version.txt manually, but with #2717 that should only be done through travis, so I added it to the .gitignore to prevent manual commits with that file. Until #2717 is done, we will have to update the min_version.txt manually with
rustc -vV > min_version.txt
when we are supporting a new nightly release.Examples
If Clippy is compiled on beta or stable it will show the following error:
If Clippy is compiled with a nightly older than specified in
min_version.txt
:Screenshot with colors:
Closes #2716