-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
lock file version 4 requires -Znext-lockfile-bump
#14655
Comments
Lockfile v4 has been stable since Rust 1.78. We are making it the default version as of 1.83 nighties unless your MSRV is below 1.78. I would look into
|
It would also help if the version info of the Rust toolchain is provided. The output of |
Can you provide full reproduction steps with only |
Thank you for your help. I just modify |
@Kelvin-1013 |
|
@epage |
As this issue is about lockfiles and you are changing the manifest, this is different. It would be good to provide standard details for someone to help you
This also looks to more be a Cargo support concern than a bug or feature request, so I would recommend posting about this on https://users.rust-lang.org/ |
The same issue that @Kelvin-1013 encountered for the same process. |
I'm getting the same error |
Solution in coral-xyz/anchor#3392 (comment). Sorry for the disturbance. It would be nice to lock this issue, given the problem is not about this repository. |
Modify the version = "4" at the top of the Cargo.lock file to version = "3". |
@kaka527 Thanks a lot, it’s all good now! |
Only solution that worked for me, thanks @kaka527 |
yes. It worked. I don't understand why. |
yes, it worked. Many thanks! |
Cargo.lockのバージョンがcargo 1.78以降4になったが、今回利用するnightlyは1.77だったので対応していなかった(?) rust-lang/cargo#14655 (comment)
This worked, thanks! |
I am going to close this, as there is no action needed. See the updated PR description that provides some solutions if you're stuck. |
Maintainer's note:
Lockfile v4 has been stabilized since Rust 1.78.0 (#12852), and become the default version when generating/updating Cargo.lock (#14595) since Rust 1.83.0.
The cause you're hitting this hard may be because: The tool you're using called to an older cargo either directly (via
cargo
executable), or indirectly (depending oncargo
as a library). However some other parts of your build system called to a newer cargo that generates a lockfile version 4.Here are solutions (in order of preference):
cargo
version to0.84.0+
, or wrapping thecargo
binary from Rust toolchain 1.83.0+.package.rust-version
to a value older than1.83
if you haven't prepared to support newer toolchains. For example,package.rust-version
when generating lockfiles (#12861).version = "4"
at the top toversion = "3"
.Problem
I have tried so many time but always fail.
Cargo build act, but anchor build not act
help me seniors
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: