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

Tweak how hyphens in crate names are allowed #23533

Closed
3 tasks done
alexcrichton opened this issue Mar 19, 2015 · 3 comments · Fixed by #23786
Closed
3 tasks done

Tweak how hyphens in crate names are allowed #23533

alexcrichton opened this issue Mar 19, 2015 · 3 comments · Fixed by #23786
Assignees
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented.
Milestone

Comments

@alexcrichton
Copy link
Member

As 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 identifier foo_bar as well. This should help reduce the breakage a little.

triage: P-backcompat-lang (1.0 beta)

@alexcrichton alexcrichton added P-backcompat-lang B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. labels Mar 19, 2015
@alexcrichton alexcrichton added this to the 1.0 beta milestone Mar 19, 2015
@alexcrichton
Copy link
Member Author

Er, tracking issue for rust-lang/rfcs#940

@alexcrichton alexcrichton self-assigned this Mar 24, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 24, 2015
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
bors added a commit that referenced this issue Mar 24, 2015
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
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 24, 2015
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
@jnicholls
Copy link

As an interim step, the compiler should continue to accept extern crate "foo-bar" as ...

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 extern crate foo_bar as ... it works. Appropriate warnings are produced regarding this change, but it does seem to be breaking builds at the moment.

@alexcrichton
Copy link
Member Author

Yeah I think I unfortunately botched that part of this :(, sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants