-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat(cargo-lock): support lockfile v4 #1206
base: main
Are you sure you want to change the base?
Conversation
304d300
to
dffd349
Compare
dffd349
to
f0e2954
Compare
[[package]] | ||
name = "toml" | ||
version = "0.8.14" | ||
source = "git https://github.com/weihanglo/toml.git?branch=a-_+#$)z#9e406273177740fa85b86b78e6d5105e932edef0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated from https://github.com/weihanglo/toml/tree/a-_+#$)z.
Hmm… missing some commits. Wait a sec. |
[[package]] | ||
name = "url" | ||
version = "2.5.2" | ||
source = "git https://github.com/weihanglo/rust-url.git?tag=a-_+#$)z#54346fa288e16b25b71c45149d7067c752b450e0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated from https://github.com/weihanglo/rust-url/releases/tag/a-_+#$)z.
In 1.78.0 Cargo introduce v4 lockfile: rust-lang/cargo#12852 The v3-to-v4 change is minimal: encode URL params with URL encoding. However, roundtrip test failed because v4 we can only have one serialization implementation at a time. I don't know how to proceed. Maybe we could * Make v4 serialization the default when it becomes the default in Cargo * Provide API for people to generate different versions of lockfiles. * Work with upstream Cargo with an in-tree pacakge for lock serialization. (This is on me?) Opened this PR for discussion.
f0e2954
to
367cb98
Compare
@weihanglo it already supports this. |
Yeah but not for |
A lot of the code has been copied from there. It would be good to follow the same approach they're using. |
I am mostly thinking through this. The Cargo team has published a new crate https://crates.io/crates/cargo-util-schemas providing basic serialization schemas for common types. I wonder if we could get there so |
Sure, that looks potentially useful |
FWIW I took a look at Unfortunately, it doesn't seem ready for that as they just released semver breaking changes a week ago. In the meantime it doesn't otherwise seem to have types relating specifically to Cargo.lock, only Cargo.toml. |
That's true. I think maybe we should just copy over from there one more time 😞. |
In 1.78.0 Cargo introduce v4 lockfile:
rust-lang/cargo#12852
The v3-to-v4 change is minimal: encode URL params with URL encoding.
However, roundtrip test failed because v4 we can only have one
serialization implementation at a time.
I don't know how to proceed. Maybe we could
Opened this PR for discussion.