Run cargo update before attempting to build Rust compute packages #179
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.
TL;DR
Invokes
cargo update
before attempting to build Rust based compute packages viafastly compute build
. This is considered "safe" ascargo update
will only update dependencies within their semver constraint ranges. However, does go against our philosophy to not mutate the users external state implicitly.Why?
We currently use the semver version of the
fastly-sys
Rust crate to indicate major and minor changes to the underlying C@E ABI, rather than the typical meaning of Rust-breaking changes in the package itself. This has come back to bite us, as even if we keep thefastly-sys
API itself stable, it depends on other packages that need to advance in major version increments, which requires a major version increment onfastly-sys
in turn. We've seen when upgrading versions thefastly-sys
gets stuck on an older version and causesrustc
compilation error messages for the user, which can be confusing and misleading.Therefore, we've decided to force an update of dependencies (and their transient deps) via
cargo update
, as a temporary solution, until we can externally manage the min/max versions offastly-sys
via a CLI configuration API.