Allow the creation of relative symlinks on Windows#24213
Allow the creation of relative symlinks on Windows#24213fmeum wants to merge 3 commits intobazelbuild:masterfrom
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 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. |
|
@meteorcloudy if I understand correctly, with the case you described that works on PWSH, further actions that use MSYS2 but with PWSH-style paths would fail. What if paths are converted so that
|
|
@pauldraper years ago you mentioned running |
|
Thank you for contributing to the Bazel repository! This pull request has been marked as stale since it has not had any activity in the last 30 days. It will be closed in the next 30 days unless any other activity occurs. If you think this PR is still relevant and should stay open, please post any comment here and the PR will no longer be marked as stale. |
Fixes #14224
RELNOTES: Symlinks created via
ctx.actions.symlink(..., target_path = "...")with--windows_enable_symlinkscan now be relative on Windows.