feat(compute/build): Support 'upper bound' constraints on Rust versions. #1350
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.
Changes planned in the upcoming Rust 1.84 release may not be compatible with the Fastly Compute platform (until further analysis is done, which may result in the need for platform changes). To ensure that customers do not build Compute packages which do not operate correctly in the platform, this PR adds a toolchain version constraint "upper bound" in addition to the existing "lower bound", only for Rust.
The upper bound is currently set to "<1.84.0", so any versions currently available, plus all releases of Rust 1.83.x, will be permitted. Because this is a hard requirement of the platform, the check has been changed to report an error (not a warning), if the version of Rust in use does not meet the requirements. While this is potentially a breaking change (since the 'fastly compute build' process will stop, instead of continuing), it can only affect users with Rust versions older than 1.56.1, which are not actually usable at this time anyway.
In addition, this PR changes the messages generated for both Go and Rust version-constraint failures to include the details of how the check failed.