Open Nevsden opened 4 years ago
I believe this is intended behavior. One of the fundamental aspects of Cargo is that it has a Cargo.lock
file which locks the dependencies to a specific version. With the lock file in place, Cargo will not automatically fetch a new version. You will need to run cargo update
to tell it to update the locked version.
@ehuss I seem to have the opposite issue. I am on nightly-1.47.0 (2020-07-23). Does this seem to be concerning enough to open an issue, or has it already been noticed?
Steps to reproduce error
(New here)
Edit: here is a asciinema reenactment, please skip unrelated changes. You can find the commit mentioned here
If you change a dependency in Cargo.toml
(such as the url), cargo build
will automatically update the Cargo.lock
entries for that dependency.
Problem My
cargo.toml
contains a dependency linking to a certain branch of a GitHub repo. After pushing changes to the GitHub repo, I was expecting that rust would notice that the branchHEAD
points to the newest commit hash and thus update the dependency itself. It did not.Looking into the checked out version of the dependency I noticed that the change I made to the repo was not yet acknowledged by cargo. Therefore I had to explicitely use
cargo update -p <Dependency>
.I am not sure, if this is wanted by the cargo ecosystem, therefore I want to report this behaviour.
Maybe I must add, that the dependency project is a private GitHub project and I use
git_fetch_with_cli==True
.Steps Let me first say, that I have not yet tested these steps. They just sum up a general procedure, which could very possibly lead to the behaviour.
cargo new ...
.cargo.toml
link to a dependency project other thancrates.io
.cargo clippy
.Possible Solution(s)
Notes
Output of
cargo version
: