-
Notifications
You must be signed in to change notification settings - Fork 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
Runfiles: support paths with spaces #4327
Comments
Hmm, this problem also applies to other platforms as well, say macOS, when running
|
@izzyleung thanks for the info! In that case I think P2 or even P3 is safe. I thought this worked on other platforms. |
Update: I haven't looked into fixing this issue and I'm most likely not going to for the next couple months. |
Dropping priority. Spaces aren't well supported on Linux either. It'd be nice if they were fully supported, but this doesn't seem like a critical feature. Demo time: Directory structure:
BUILD file:
bin.sh:
Space aren't supported in data dependencies:
Spaces don't play well with genrule's
|
Seems like there's no workaround for this in cases where you're building coverage so your dependencies' source files are linked as runfiles and could have spaces. EDIT: Looks like |
@lberki Do you happen to have data on the drawbacks of |
No data than I can take off the shelf, sorry. At Google, our runfiles trees are large enough that it stopped being feasible like a decade ago. |
cc @tjgq |
To clarify (had a chat with Lukacs internally) - at Google we use a third implementation that isn't available in Bazel. Unfortunately My personal opinion is that we should fix this issue [EDIT: it has been fixed in 7b87ae1] and then attempt to make in-process the default across the board (for Bazel) and delete the out-of-process implementation, but I'm not planning to work on it right now (although I might end up making incremental progress towards it while fixing #18580). |
@tjgq Could you briefly explain the key properties in which Google's implementation differs from the ones available in Bazel? |
We have an output tree backed by a FUSE daemon and directly tell the daemon to create the symlinks in the FUSE filesystem. This is similar to what's being discussed at #12823. |
The bulk of this CL is just plumbing the flag from the configuration into the RunfilesSupplier implementations. The functional changes are in RunfilesTreeUpdater; compare with the preexisting SymlinkTreeStrategy implementation. Additionally, I've fixed some variable and method names to exactly match the flags defined in CoreOptions; the code is less confusing and easier to refactor that way. The motivation behind this change is to investigate the feasibility of defaulting to the in-process implementation and deleting the out-of-process one, which has known issues (see #4327). PiperOrigin-RevId: 558112830 Change-Id: I4c509be665776013ffc2d483694df515d5ab32f2
…und it. For more information: bazelbuild/bazel#4327. PiperOrigin-RevId: 571152898
…paths with spaces for runfiles. More information about the issue can be found in bazelbuild/bazel#4327. PiperOrigin-RevId: 572980749
…paths with spaces for runfiles. More information about the issue can be found in bazelbuild/bazel#4327. PiperOrigin-RevId: 572980749
…paths with spaces for runfiles. More information about the issue can be found in bazelbuild/bazel#4327. PiperOrigin-RevId: 572980749
…paths with spaces for runfiles. More information about the issue can be found in bazelbuild/bazel#4327. PiperOrigin-RevId: 572980749
…paths with spaces for runfiles. More information about the issue can be found in bazelbuild/bazel#4327. PiperOrigin-RevId: 572980749
Is there a way to use a delimiter other then a whitespace for Runfiles manifest entry? e.g. |
It seems like the workaround/fix for this issue is to turn on The only drawback mentioned above was fixed in 7b87ae1 which landed in Bazel 7.0.0. There has been another inquiry on Slack about spaces in the runfiles. I suggest we turn the flag on by default in 7.3.0. As for the manifest file itself, I think #14676 is "almost" there but needs some additional effort to take it over the finish line. If folks are interested in making the runfiles manifest format a bit easier to parse, take a look there. |
@sluongng I would just like to point out this breaking issue with Unsure if its Bazel, or the rules that aren't vibing with this in the way that is expected, but the rule set is popular enough you may want to see it resolved first. I suspect I'm the first-mover to come across this. Here is the ticket: aspect-build/rules_js#1877 |
Cross referencing this issue as the likely root cause of the problem in pypa/setuptools#4605. As previously noted in bazelbuild/rules_python#617 previous workarounds are not bullet proof and there was no guarantee that similar problems would not happen again due the limitation in |
Bazel doesn't handle that gracefully. See bazelbuild/bazel#4327 And `--experimental_inprocess_symlink_creation` doesn't currenly work very well in our repo either. CMK-19117 Change-Id: I2ffeca787241b23af088b9ad19b6ddc59969a664
Update: this bug no longer claims to be Windows-specific, see #4327 (comment)
Fix this TODO:
bazel/src/main/java/com/google/devtools/build/lib/windows/runfiles/WindowsRunfiles.java
Lines 54 to 55 in 7b423cc
The text was updated successfully, but these errors were encountered: