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

Add a command line flag to mix metadata into the version hash #14471

Closed
brson opened this issue May 27, 2014 · 0 comments · Fixed by #15319
Closed

Add a command line flag to mix metadata into the version hash #14471

brson opened this issue May 27, 2014 · 0 comments · Fixed by #15319

Comments

@brson
Copy link
Contributor

brson commented May 27, 2014

cc #14470

Cargo wants to be in control of deciding which version of a crate to link to, not rustc. Under the current cargo design, rustc does not need to know about version numbers at all except to frob the symbol hashes a bit. If rustc no longer knows about versioning, then it needs to provide some mechanism for mixing versioning metadata into the version hashes.

@brson brson added the A-pkg label May 27, 2014
bors added a commit that referenced this issue Jul 5, 2014
This is an implementation of [RFC 35](https://github.com/rust-lang/rfcs/blob/master/active/0035-remove-crate-id.md).

The summary for this PR is the same as that of the RFC, with one addendum:


* Removes the `#[crate_id]` attribute and knowledge of versions from rustc.
* Added a `#[crate_name]` attribute similar to the old `#[crate_id]` attribute
* Output filenames no longer have versions or hashes
* Symbols no longer have versions (they still have hashes)
* A new flag, `--extern`, is used to override searching for external crates
* A new flag, `-C metadata=foo`, used when hashing symbols
* [added] An old flag, `--crate-name`, was re purposed to specify the crate name from the command line.

I tried to maintain backwards compatibility wherever possible (with warnings being printed). If I missed anywhere, however, please let me know!

[breaking-change]

Closes #14468
Closes #14469
Closes #14470
Closes #14471
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

Successfully merging a pull request may close this issue.

1 participant