Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --locked in docs for how to install libcnb-cargo #734

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

edmorley
Copy link
Member

By default cargo install will not use any lockfile in the published crate, and instead will install the latest in-range version of any transitive dependencies.

By using --locked the lockfile will be used, ensuring a more deterministic installation.

Note: Whilst this repo intentionally doesn't commit a lockfile to Git (since this is a library crate), Cargo will include one in the crate uploaded to crates.io at time of publish, so --locked will still work.

See:
https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile

By default `cargo install` will not use any lockfile in the published
crate, and instead will install the latest in-range version of any
transitive dependencies.

By using `--locked` the lockfile will be used, ensuring a more
deterministic installation.

Note: Whilst this repo intentionally doesn't commit a lockfile to
Git (since this is a library crate), Cargo will include one in the
crate uploaded to crates.io at time of publish, so `--locked` will
still work.
@edmorley edmorley added documentation Improvements or additions to documentation skip changelog labels Nov 15, 2023
@edmorley edmorley self-assigned this Nov 15, 2023
@edmorley edmorley marked this pull request as ready for review November 15, 2023 09:41
@edmorley edmorley requested a review from a team as a code owner November 15, 2023 09:41
@edmorley edmorley enabled auto-merge (squash) November 15, 2023 09:41
Copy link
Member

@Malax Malax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

@edmorley edmorley merged commit cbf08bf into main Nov 15, 2023
6 checks passed
@edmorley edmorley deleted the edmorley/cargo-install-locked branch November 15, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation skip changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants