-
Notifications
You must be signed in to change notification settings - Fork 444
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
Replace slashes with underscores in default crate names. #1334
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
LGTM, but looks from CI like something on Windows isn't loving the change?
Fixed, PTAL! |
illicitonion
approved these changes
May 13, 2022
cfredric
added a commit
to cfredric/rules_rust
that referenced
this pull request
May 13, 2022
…elbuild#1334)" This reverts commit df35490.
scentini
pushed a commit
that referenced
this pull request
May 13, 2022
scentini
pushed a commit
that referenced
this pull request
May 13, 2022
This is another attempt at #1334, which sought to make "/" characters legal in Rust target names. This PR differs from #1334 in how it handles build artifacts that are based on `crate_info.output`. There are a few places that currently assume that calling `ctx.actions.declare_file(...)` will always declare a file in the same directory as `crate_info.output`, i.e. as `ctx.actions.declare_file(ctx.label.name + ...)`. In a world where label names may include slashes (which is the case today!), this is not a safe assumption, since a slash in the target name causes bazel to create a subdirectory for the output. Specifically, this PR fixes incorrect locations for the following items (when the target name includes a slash): * PDB files * dSYM files * .lib files This leaves a few things that look like they make the same assumption, but I'm not sure how they're used or if they should be updated: * `"_ambiguous_libs/" + crate_info.output.basename + "/" + symlink_name` for ambiguous libraries * The linkstamp output path (`"_objs/" + crate_info.output.basename + "/" + ...`)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is consistent with the existing documentation, which says that all illegal characters will be converted to underscores (but in reality, only hyphens were converted).
This change has no risk of breakage, since it turns broken builds into passing ones, but not vice versa.