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

Cargo versioning #2182

Closed
wants to merge 1 commit into from
Closed

Conversation

joshtriplett
Copy link
Member

@joshtriplett joshtriplett commented Oct 19, 2017

Rendered

RFC co-authored by myself and @wycats, and pre-reviewed by @alexcrichton.

@joshtriplett joshtriplett added the T-cargo Relevant to the Cargo team, which will review and decide on the RFC. label Oct 19, 2017
@withoutboats
Copy link
Contributor

To summarize the RFC as I understand it: the idea is that cargo can figure out your minimum version requirements based on what features of cargo are necessary to compile it, and that it will then record it in the index entry for your crate. This will then influence error messages and version resolution. The user interface doesn't need to change to support this (that is, you don't specify a minimum version in your Cargo.toml).

Is that right?

@bryteise
Copy link

Would it be possible to allow an optional cargo version number if crate authors want to be able to enforce they will be using other newer features of cargo but currently do not?

@joshtriplett
Copy link
Member Author

joshtriplett commented Oct 19, 2017

@withoutboats Correct. This is best-effort, and if the schemas turn out to be incorrect we can fix bugs in them.

@bryteise Perhaps, though the default Cargo.toml should not include a version number. But I think the reverse seems more important: "don't let me use any features from Cargo newer than this". Again, best-effort, but useful as a local development complement to a good CI system.

@joshtriplett joshtriplett changed the title Add Cargo versioning RFC Cargo versioning Oct 20, 2017
@Ericson2314
Copy link
Contributor

Sorry to take so long to get to this. This is generally quite good, but I am also a bit wary of no manual recourse in Cargo.toml files themselves. In particular, the tentative ideas about non-registry dependencies:

For crates obtained via alternate registries or directly from version control or filesystem paths, Cargo may attempt to use the schema provided by crates.io-index to parse the Cargo.toml file and distinguish types of errors, but may have to continue and warn rather than stopping with an error.

seem sub-par. crates.io access for non-crates.io deps seems likely to cause confusion, non-determinism, and annoyance when there is no internet access. An optional schema version in Cargo.toml circumnavigates the any need for such heuristics.

@Ericson2314
Copy link
Contributor

N.B. haskell/cabal#4899 is the plan for schema versions for Cabal. Their situation is more awkward because Cabal files are a non-standard syntax, in addition to schema within that syntax, but I'd thought i'd still link for reference.

@joshtriplett
Copy link
Member Author

@rfcbot postpone

I no longer think this is the right approach. I think we need to have a new index format that incorporates a Cargo version number, but I don't think we should have a complex detection mechanism like this.

@rfcbot
Copy link
Collaborator

rfcbot commented Sep 18, 2019

Team member @joshtriplett has proposed to postpone this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. disposition-postpone This RFC is in PFCP or FCP with a disposition to postpone it. labels Sep 18, 2019
@Eh2406
Copy link
Contributor

Eh2406 commented Sep 18, 2019

Note that the MSRV RFC is not so different from the first alternative.
@rfcbot reviewed

@ehuss
Copy link
Contributor

ehuss commented Sep 18, 2019

@rfcbot reviewed

@rfcbot
Copy link
Collaborator

rfcbot commented Sep 18, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. and removed proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. labels Sep 18, 2019
@rfcbot
Copy link
Collaborator

rfcbot commented Sep 28, 2019

The final comment period, with a disposition to postpone, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC is now postponed.

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this RFC. postponed RFCs that have been postponed and may be revisited at a later time. and removed final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. disposition-postpone This RFC is in PFCP or FCP with a disposition to postpone it. labels Sep 28, 2019
@rfcbot rfcbot closed this Sep 28, 2019
@joshtriplett joshtriplett deleted the cargo-versioning branch January 19, 2021 20:37
@joshtriplett
Copy link
Member Author

One further followup on this: Since Cargo 1.19, in mid-2017, Cargo now ignores index entries it doesn't understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-versioning Versioning related proposals & ideas finished-final-comment-period The final comment period is finished for this RFC. postponed RFCs that have been postponed and may be revisited at a later time. T-cargo Relevant to the Cargo team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants