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

Use symlinked runfiles on Windows when supported #5807

Closed
filipesilva opened this issue Aug 8, 2018 · 2 comments
Closed

Use symlinked runfiles on Windows when supported #5807

filipesilva opened this issue Aug 8, 2018 · 2 comments
Assignees
Labels
area-Windows Windows-specific issues and feature requests P2 We'll consider working on this in future. (Assignee optional) platform: windows team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request

Comments

@filipesilva
Copy link

filipesilva commented Aug 8, 2018

Description of the problem / feature request:

On Windows Bazel sets RUNFILES_MANIFEST_ONLY to 1 and does not generate symlinks to runfiles. This does not change if the current user can create symlinks.

On recent Windows 10 versions it is possible to enable symlinks for all users:

Now in Windows 10 Creators Update, a user (with admin rights) can first enable Developer Mode, and then any user on the machine can run the mklink command without elevating a command-line console.

More details can be found in https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/

The feature I am requesting is to generate symlink to runfiles on Windows when supported by the current user.

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

Creating rules with windows support is not trivial (#3726 (comment)).

Using symlinks on windows when available should make many existing rules work on Windows without having to resolve runfiles via the manifest, given the user has symlink support.

On systems Windows without symlink support enabled, looking up the runfiles would still be necessary.

Related to #3726, #3889, #1212

/cc @alexeagle

@meteorcloudy meteorcloudy self-assigned this Aug 17, 2018
@meteorcloudy meteorcloudy added area-Windows Windows-specific issues and feature requests type: feature request platform: windows P2 We'll consider working on this in future. (Assignee optional) labels Aug 17, 2018
bazel-io pushed a commit that referenced this issue Aug 29, 2018
Provide a ReadSymlinkW function for resolving symlink on Windows.
Also made IsDirectoryW available.

Working towards: #5807
Closes #6014.

Change-Id: I2b289c9b9701b28421afe4f81e858d678918c16b
PiperOrigin-RevId: 210696984
meteorcloudy added a commit to meteorcloudy/bazel that referenced this issue Aug 29, 2018
Working towards: bazelbuild#5807

Change-Id: Iae10ff439bb3e8513c44ebfc4c174409623991d9
bazel-io pushed a commit that referenced this issue Aug 30, 2018
Working towards: #5807

@laszlocsomor

Closes #6024.

Change-Id: I2e1fb56f7686872f5e7d4724c93c1ad2e6e02311
PiperOrigin-RevId: 210905364
@meteorcloudy
Copy link
Member

@filipesilva I have made some progress on this recently.
Now with Bazel built from HEAD, symlink tree will be available on Windows when you pass --experimental_enable_runfiles.
Can you try if it helps with #5926?

@meteorcloudy
Copy link
Member

@filipesilva Just found a bug when dealing with long path, sending a fix now.

bazel-io pushed a commit that referenced this issue Aug 31, 2018
We should make sure the path passing to Windows API has the \\?\ prefix.

Related #5807

RELNOTES: None
PiperOrigin-RevId: 211039921
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Aug 31, 2018
We should make sure the path passing to Windows API has the \\?\ prefix.

Related bazelbuild#5807

RELNOTES: None
PiperOrigin-RevId: 211039921
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
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 P2 We'll consider working on this in future. (Assignee optional) platform: windows 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