Skip to content

Running cargo update without a Cargo.lock ignores arguments #6872

New issue

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

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

Already on GitHub? # to your account

Closed
glandium opened this issue Apr 24, 2019 · 2 comments
Closed

Running cargo update without a Cargo.lock ignores arguments #6872

glandium opened this issue Apr 24, 2019 · 2 comments
Labels

Comments

@glandium
Copy link
Contributor

Problem
Say you want to test a crate against a specific version of one of its dependencies. One way to do that is to run cargo update -p $dep --precise $version. The problem is that when you do that without a pre-existing Cargo.lock (like, running that as the first command in a travis script), all the arguments are ignored, and you get the same Cargo.lock as you would plain cargo update, so without $dep at the wanted $version.

Notes

Output of cargo version:

cargo 1.34.0 (6789d8a0a 2019-04-01)
@glandium glandium added the C-bug Category: bug label Apr 24, 2019
@fluffysquirrels
Copy link
Contributor

I'm taking a look at this.

bors added a commit that referenced this issue May 15, 2019
…chton

Fix for "Running cargo update without a Cargo.lock ignores arguments" #6872
bors added a commit to rust-lang/rust that referenced this issue May 16, 2019
Update cargo

17 commits in 759b6161a328db1d4863139e90875308ecd25a75..c4fcfb725b4be00c72eb9cf30c7d8b095577c280
2019-05-06 20:47:49 +0000 to 2019-05-15 19:48:47 +0000
- tests: registry: revert readonly permission after running tests. (rust-lang/cargo#6947)
- Remove Candidate (rust-lang/cargo#6946)
- Fix for "Running cargo update without a Cargo.lock ignores arguments" rust-lang/cargo#6872 (rust-lang/cargo#6904)
- Fix a minor mistake in the changelog. (rust-lang/cargo#6944)
- Give a better error message when crates.io requests time out (rust-lang/cargo#6936)
- Re-enable compatibility with readonly CARGO_HOME (rust-lang/cargo#6940)
- Fix version of `ignore`. (rust-lang/cargo#6938)
- Stabilize offline mode. (rust-lang/cargo#6934)
- zsh: Add doc options to include non-public items documentation (rust-lang/cargo#6929)
- zsh: Suggest --lib option as binary template now the default (rust-lang/cargo#6926)
- Migrate package include/exclude to gitignore patterns. (rust-lang/cargo#6924)
- Implement the Cargo half of pipelined compilation (take 2) (rust-lang/cargo#6883)
- Always include `Cargo.toml` when packaging. (rust-lang/cargo#6925)
- Remove unnecessary calls to masquerade_as_nightly_cargo. (rust-lang/cargo#6923)
- download: fix "Downloaded 1 crates" message (crates -> crate) (rust-lang/cargo#6920)
- Changed RUST_LOG usage to CARGO_LOG to avoid confusion. (rust-lang/cargo#6918)
- crate download: don't print that a crate was the largest download if it was the only download (rust-lang/cargo#6916)
@ehuss
Copy link
Contributor

ehuss commented Jul 28, 2019

This was fixed by #6904.

@ehuss ehuss closed this as completed Jul 28, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants