-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Normalize hyphens to underscores in crate names #1443
Conversation
r? @wycats (rust_highfive has picked a reviewer for you, use r? to override) |
Note that the massive diff is because this is rebased on #1441 which has some necessary internal fixes for this patch to work properly. Only the last commit is part of this PR. |
exec_engine: None, | ||
release: true, | ||
mode: ops::CompileMode::Bench, | ||
filter: if benches.len() == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.is_empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like there are about 4 more occurrences of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are actually from #1441 (this PR is just rebased on that one currently)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, yep, missed that. Thanks, and sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries :)
d55d4ed
to
9e35e19
Compare
r=me |
@bors: r=brson |
📌 Commit 9e35e19 has been approved by |
⌛ Testing commit 9e35e19 with merge a9d1044... |
💔 Test failed - cargo-win-32 |
9e35e19
to
c9b4fdd
Compare
@bors: r=brson c9b4fdd |
⌛ Testing commit c9b4fdd with merge 6e7d552... |
💔 Test failed - cargo-linux-32 |
c9b4fdd
to
b2acc24
Compare
@bors: r=brson |
📌 Commit b2acc24 has been approved by |
This change allows *packages* to have hyphens in them, but they are always translated to underscores when translated to a crate name. This means that all crates are compiled with a `--crate-name` that has no hyphens (as well as `--extern` directives having no hyphens). Binaries and examples, however, are allowed to contain hyphens in their name. The "crate name" will still have an underscore, but the output will be in the same dasherized name. Explicitly named targets are not allowed to have hyphens in them as well.
💔 Test failed - cargo-win-32 |
@bors: retry On Tue, Mar 24, 2015 at 7:02 PM, bors notifications@github.com wrote:
|
⚡ Previous build results for cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64 are reusable. Rebuilding only cargo-win-32, cargo-win-64... |
💔 Test failed - cargo-win-32 |
This change allows *packages* to have hyphens in them, but they are always translated to underscores when translated to a crate name. This means that all crates are compiled with a `--crate-name` that has no hyphens (as well as `--extern` directives having no hyphens). Binaries, examples, benchmarks, and tests, however, are allowed to contain hyphens in their name. The "crate name" will still have an underscore, but the output will be in the same dasherized name. Explicitly named targets are not allowed to have hyphens in them as well.
b2acc24
to
afe88e0
Compare
@bors: r+ On Tue, Mar 24, 2015 at 7:19 PM, bors notifications@github.com wrote:
|
📌 Commit afe88e0 has been approved by |
…hton This change allows *packages* to have hyphens in them, but they are always translated to underscores when translated to a crate name. This means that all crates are compiled with a `--crate-name` that has no hyphens (as well as `--extern` directives having no hyphens). Binaries and examples, however, are allowed to contain hyphens in their name. The "crate name" will still have an underscore, but the output will be in the same dasherized name. Explicitly named targets are not allowed to have hyphens in them as well.
☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64 |
Because Cargo now errors when explicitely named targets contain hyphens: rust-lang/cargo#1443
This change allows packages to have hyphens in them, but they are always
translated to underscores when translated to a crate name. This means that all
crates are compiled with a
--crate-name
that has no hyphens (as well as--extern
directives having no hyphens).Binaries and examples, however, are allowed to contain
hyphens in their name. The "crate name" will still have an underscore, but the
output will be in the same dasherized name.
Explicitly named targets are not allowed to have hyphens in them as well.