-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo install
not working correctly when using git repo
#13259
Comments
It doesn't seem to be reproducible to me. What was the console output you've got in the beginning and the end? It is supposed to have
And you shall see the git revision. Also, how did you verify the binaries are the same? Could you provide the exact step you build and verify it? |
So the build cache was shared, as It does look like a bug if the target-dir is shared across builds. |
it's indeed shared, set by using [build]
target-dir = "/Users/golden_water/.cargo/shared-target output of
|
Dug into it a bit. It seems that cargo/src/cargo/ops/cargo_install.rs Lines 826 to 827 in ddec308
This doesn't seem wrong. However, when computing fingerprints to determine if a rebuild is needed, Cargo doesn't hash git revision into fingerprint directly. Instead, it checks if source file path has changed. For git source, it is an absolute path to cargo/src/cargo/core/compiler/fingerprint/mod.rs Lines 587 to 589 in 9574120
The possible fix might be |
@rustbot claim I will take a look. |
Tested locally, I can only reproduce it. Working on it. |
Problem
when using
cargo install
to install a different commit from a git repo, the executable doesn't gets replaced to target versionSteps
Possible Solution(s)
No response
Notes
maybe related to workspace
tried
--force
,+nightly
and uninstall then installafter run
cargo clean
, it will install the proper versionthe nightly version:
Version
The text was updated successfully, but these errors were encountered: