-
Notifications
You must be signed in to change notification settings - Fork 431
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
Allow deps to be renamed #285
Conversation
68d065a
to
076c6f4
Compare
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.
Hi, Thanks for sending out this PR.
What is the goal of the alias?
It seems to me one of the goal would be to avoid crate name collision but this PR does not address this case.
Also could you had an aliasing test case in the examples?
rust/private/rust.bzl
Outdated
@@ -275,6 +279,13 @@ _rust_common_attrs = { | |||
linking a native library. | |||
"""), | |||
), | |||
"aliases": attr.label_keyed_string_dict( | |||
doc = _tidy(""" | |||
Remap crates to a new name or monikor for linkage to this target |
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.
monikor is a typo?, of monitor?
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.
typo, should be moniker
rust/private/rust.bzl
Outdated
doc = _tidy(""" | ||
Remap crates to a new name or monikor for linkage to this target | ||
|
||
These are other `rust_library` targets and will be presented as the new name given |
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.
Unfinished sentence.
Sorry I dashed this out a little quickly yesterday to pack up just before the holidays. This is to allow for crate style renames, this is something that occurs very occasionally in crates, the basic idea is to present to a library an external crate under a different name. The big one where this showed up was in compiling futures at version 0.3.x, with the feature [dependencies.futures_01]
version = "0.1.25"
optional = true
package = "futures" That is, it depends on an earlier version of futures and includes it, from its viewpoint, as the crate This rename is achieved through changing the name on the This is related to google/cargo-raze#123 Without this, its pretty hard to compile crates that perform renames without patching |
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.
Just need to address the two comments on comments.
Addressed the comments and added some basic tests |
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.
There are failure on the CI, could you address them?
f97bbc2
to
4dc06c1
Compare
Looks like the build error was an unrelated stardoc incompatibility change, I will push that as a seperate PR that this is based on |
4dc06c1
to
e25221e
Compare
This currently is blocked / deps on #290 |
e25221e
to
92f56af
Compare
92f56af
to
1f002a4
Compare
1f002a4
to
6ee899e
Compare
Rebasing fun, do we want to merge this to unlock cargo-raze? |
Thanks for this PR! |
No description provided.