Skip to content
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

Should a version indicator be encoded into Cargo.lock #7144

Closed
alexcrichton opened this issue Jul 17, 2019 · 4 comments
Closed

Should a version indicator be encoded into Cargo.lock #7144

alexcrichton opened this issue Jul 17, 2019 · 4 comments
Labels
A-lockfile Area: Cargo.lock issues

Comments

@alexcrichton
Copy link
Member

The Cargo.lock format is changing over time (and is practically guaranteed to continue changing) and the most recent change has brought up ideas again about possibly encoding a version number into Cargo.lock. There's a number of comments on that thread weighing some pros and cons (including this one).

One possible way to implement this would be to add a field to the [metadata] table. Every version of Cargo ever preserves the [metadata] table, and so we can add a version number in there practically any time and have it preserved by older Cargo while recognized by newer Cargo.

@mathstuf
Copy link
Contributor

mathstuf commented Dec 10, 2019

An alternative would be to add flags to newer releases to write out old formats as well.

@est31
Copy link
Member

est31 commented Jul 22, 2020

PR #8522 has been opened to add such version numbers.

@epage
Copy link
Contributor

epage commented Apr 22, 2022

At this point we are on version 3 of lock files. Any reason to not close this issue?

@est31
Copy link
Member

est31 commented Apr 22, 2022

Yeah #8522 has added that number as 3. The issue can be closed.

@epage epage closed this as completed Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lockfile Area: Cargo.lock issues
Projects
None yet
Development

No branches or pull requests

5 participants