Check in Cargo.lock files for examples and test apps #1885
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.
We currently inconsistently check in Cargo.lock files across examples and test apps. Whether to check in Cargo.lock files is an area of debate because there are advantages and disadvantages to both. The Cargo team has officially said ¯_(ツ)_/¯ to this question..
For our example and test apps, the ability to do reproducible builds is the biggest reason to check in the lock files. Everyone will now build these examples and test apps exactly the same way (even if a new semver compatible version of a dependency is released in the mean time). This , however, might make PRs more noisy as updating a dependency (especially through the Rust SDK) might cause a cascading effect that causes all the Cargo.lock files to need to update. I believe this cost is worth it.