-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 the creation of relative symlinks on Windows #24213
base: master
Are you sure you want to change the base?
Conversation
075e5c5
to
7f91c3a
Compare
Thanks for working on this! I recently observed some weird behavior with relative symlinks created in pwsh.exe on windows. It went something like this: I'm not sure if this also works like this on linux and under which specific circumstances this occurs. Maybe the symlinks were made absolute for this reason. We have changed our PowerShell script to produce absolute symlinks (and disabled caching) to fix bazel-bin invocations. |
@meteorcloudy Do you happen to know what's up with relative symlinks on Windows? I can add more test cases. |
This is probably due to bazel/src/main/java/com/google/devtools/build/lib/bazel/BazelRepositoryModule.java Lines 516 to 526 in 7ee3e9c
So given:
We got different results based on which style of file path you use for
So basically
but
I think we might want to be a bit careful on opening up relative symlinks on Windows since they behave different due to this issue. |
Fixes #14224
RELNOTES: Symlinks created via
ctx.actions.symlink(..., target_path = "...")
with--windows_enable_symlinks
can now be relative on Windows.