rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.72k stars 2.42k forks source link

lock file version 4 requires `-Znext-lockfile-bump` #14655

Closed Kelvin-1013 closed 53 minutes ago

Kelvin-1013 commented 2 weeks ago

Problem

Image 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

epage commented 2 weeks ago

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

weihanglo commented 2 weeks ago

It would also help if the version info of the Rust toolchain is provided. The output of cargo -vV should be sufficient.

Kelvin-1013 commented 2 weeks ago

Thank you for your response. Image

Image

`[workspace] members = [ "programs/*" ] resolver = "2"

[profile.release] overflow-checks = true lto = "fat" codegen-units = 1 [profile.release.build-override] opt-level = 3 incremental = false codegen-units = 1 `

Image

I provide this info, give me advice, seniors

epage commented 2 weeks ago

Can you provide full reproduction steps with only cargo?

Kelvin-1013 commented 53 minutes ago

Thank you for your help.

I just modify resolver=4 to resolver=3 in Cargo.toml and run anchor build, then this issue is resolved.