-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tweak how hyphens in crate names are allowed #23533
Comments
Er, tracking issue for rust-lang/rfcs#940 |
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc rust-lang#23533
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc rust-lang#23533
Based on the latest rustc, this is not working. It is still looking for a target named "foo-bar" when it should be looking for "foo_bar". By changing that line to |
Yeah I think I unfortunately botched that part of this :(, sorry about that! |
extern crate
, require an identifier to be used instead - rustc: Add support forextern crate foo as bar
#23546foo-bar
andfoo_bar
to crates.io change-
to_
in Cargo for passing the--extern
flag - Normalize hyphens to underscores in crate names cargo#1443As an interim step, the compiler should continue to accept
extern crate "foo-bar" as ...
both in terms of quotes and in terms of matching the identifierfoo_bar
as well. This should help reduce the breakage a little.triage: P-backcompat-lang (1.0 beta)
The text was updated successfully, but these errors were encountered: