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

FR: Option for collapsing runfile tree paths on Windows #13525

Closed
JohanLaineTobii opened this issue May 27, 2021 · 1 comment
Closed

FR: Option for collapsing runfile tree paths on Windows #13525

JohanLaineTobii opened this issue May 27, 2021 · 1 comment
Labels
area-Windows Windows-specific issues and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request

Comments

@JohanLaineTobii
Copy link

Description of the problem / feature request:

Feature request: Create a flag that (at least on Windows) collapses part of the runfile tree in a similar way as #4149 was done for a similar issue. The commit message gives a pretty good explanation: bb9ae6a

Feature requests: what underlying problem are you trying to solve with this feature?

From what I can tell, Windows symlinks don't work if the path of the origin is too long. At least not symlinks to executables. Note that this is not related to the testrunner or any other Bazel wrapper, this is an issue with the symlink itself. It's not even possible to manually run executables through symlinks where the origin is too long.

This creates issues with symlink'd runfile trees when running tests on Windows. The issue here is with Windows and not Bazel, so I mean this to be a feature request allowing a workaround.

Some more background: We have a repository that is fairly "deep", so Bazel runfiles paths get very long. As stated above, such symlinks don't seem to work on Windows (verified on 3 machines). From what I can tell this is a Windows bug that I currently cannot work around other than:

  • Creating a flatter structure in our repository
  • Setting --output_user_root to something short

Have you found anything relevant by searching the web?

Only the issue above (#4149) which has a very similar motivation.

This may sound similar to an issue I posted over two years ago (#7479) but it's actually different since there doesn't seem to be a workaround.

@sventiffe sventiffe added area-Windows Windows-specific issues and feature requests team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged type: feature request labels Jun 18, 2021
@meteorcloudy meteorcloudy added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Jan 24, 2022
@meteorcloudy
Copy link
Member

bb9ae6a is only for shorten the path for generated object files, because MSVC compiler cannot take long path. The optimazation doesn't make sense for runfiles. I think there are ways to work around long path issues on Windows

Useful links:
https://betanews.com/2016/05/29/long-paths-windows-10/#:~:text=Navigate%20to%20Local%20Computer%20Policy,paths%20option%20and%20enable%20it.
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request
Projects
None yet
Development

No branches or pull requests

3 participants