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

Changing metadata should be possible without bumping a version #7146

Closed
lifthrasiir opened this issue Nov 25, 2014 · 10 comments
Closed

Changing metadata should be possible without bumping a version #7146

lifthrasiir opened this issue Nov 25, 2014 · 10 comments

Comments

@lifthrasiir
Copy link

Currently Cargo doesn't allow the metadata to be separately updated. This doesn't seem right (as the semantic versioning only concerns about the public API and the metadata is not a part of the public API).

In order to fix this issue, the publish endpoint (/api/v1/crates/new) should be adjusted to accept the metadata without the tarball (well, or have a new endpoint for that), and the server will check if the name, version, dependencies and features match to those stored before updating that. In the CLI the cargo publish command should ask for the metadata update when the version hasn't been changed.

@sfackler
Copy link
Member

👍

@Folyd
Copy link
Contributor

Folyd commented May 24, 2020

Any progress on this issue?

@carols10cents
Copy link
Member

If there was any progress, it would show up on this issue.

@epage
Copy link

epage commented Sep 19, 2023

I feel like the trend has been to remove metadata from source, like https://rust-lang.github.io/rfcs/3052-optional-authors-field.html or crates.io deciding to stop showing badges.

@epage
Copy link

epage commented Sep 19, 2023

Moving this to crates.io as they should be making the decision on what metadata is mutable and how users should edit it (web UI, cargo command, etc). From there, they can request any desired cargo features to accomplish the wider goal.

Most likely, someone will need to step up to drive this forward to look into what metadata should be mutable, why, and what workflows best fit with that context.

@epage epage transferred this issue from rust-lang/cargo Sep 19, 2023
@hi-rustin
Copy link
Member

I think the trick part is we also package Cargo.toml[.orig] in .crate file. If crates.io only allows to update the metadata. Then the metadata of Cargo.toml[.orig] from the .crate would be different from the database.

Also, I think it would also affect the checksum check of the tarball file.

@retep998
Copy link
Member

The metadata in the crate itself should not be mutable. Instead the metadata from the crate should be used as the default value displayed on crates.io, but the user can then change the metadata visible on crates.io via the web UI, without affecting the metadata actually stored in the crate.

@hi-rustin
Copy link
Member

but the user can then change the metadata visible on crates.io via the web UI, without affecting the metadata actually stored in the crate.

I think this kind of inconsistency would cause a lot of confusion.

Can I ask what kind of metadata you only want to change in creates.io instead of Cargo.toml?

@hi-rustin
Copy link
Member

See: https://blog.vlt.sh/blog/the-massive-hole-in-the-npm-ecosystem

And #7194 will force us to use these fields from Cargo.toml.

@Turbo87
Copy link
Member

Turbo87 commented Oct 9, 2023

I just rediscovered #3167, which basically describes the same thing. Let's move the discussion over there to not have two duplicate issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants