Skip to content

cargo install not working correctly when using git repo #13259

Open
@BillGoldenWater

Description

@BillGoldenWater

Problem

when using cargo install to install a different commit from a git repo, the executable doesn't gets replaced to target version

Steps

  1. cargo install --git https://github.com/BillGoldenWater/Tools-rs --rev b6c330a video_in_waveform
  2. get the hash of .cargo/bin/video_in_waveform
  3. cargo install --git https://github.com/BillGoldenWater/Tools-rs --rev e25e95d video_in_waveform
  4. compare the hash of .cargo/bin/video_in_waveform to previously, it's the same

Possible Solution(s)

No response

Notes

maybe related to workspace

tried --force, +nightly and uninstall then install

after run cargo clean, it will install the proper version

the nightly version:

cargo 1.77.0-nightly (2ce45605d 2024-01-04)
release: 1.77.0-nightly
commit-hash: 2ce45605d9db521b5fd6c1211ce8de6055fdb24e
commit-date: 2024-01-04
host: aarch64-apple-darwin
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0 (sys:0.4.70+curl-8.5.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Mac OS 14.2.1 [64-bit]

Version

cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
commit-date: 2023-11-20
host: aarch64-apple-darwin
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0 (sys:0.4.68+curl-8.4.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Mac OS 14.2.1 [64-bit]

Metadata

Metadata

Assignees

Labels

A-gitArea: anything dealing with gitC-bugCategory: bugCommand-installS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions