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

fix(toolchain): symlink all toolchain files for the host toolchain #1745

Merged
merged 19 commits into from
Feb 8, 2024

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Feb 5, 2024

Previously we would only symlink the interpreter binary itself
when creating the hermetic host toolchain used in setting up the
whl_library repositories. This works on UNIX platforms and Windows
if they have the following in their .bazelrc:

startup --windows_enable_symlinks

In our CI we had the same lines but the users did not need to add them
until the 0.29.0 forced them to have them because we actually started
using symlinks on Windows. If the symlinks are not enabled on the host
platform bazel tries to be helpful and copies the files over instead
of making the links. We are leveraging this to just symlink all of the
contents of the python interpreter repository for the host platform to
the _host toolchain repository.

Fixes #1723

Use the same binary path that the regular toolchain is using
in an attempt to see if the behaviour is any different.

Attempt to fix #1723
@aignas aignas marked this pull request as ready for review February 5, 2024 12:39
@f0rmiga f0rmiga added this pull request to the merge queue Feb 6, 2024
This requires admin privileges and it seems `bazel` and a few other
project may have relied on us just working without symlink support. This
may break more things, so let's see what the CI says.
@aignas aignas removed this pull request from the merge queue due to a manual request Feb 6, 2024
@aignas
Copy link
Collaborator Author

aignas commented Feb 6, 2024

I don't think this is fixing anything yet, so I have removed it from the queue for now, I am working on an alternative fix. Will mark as a draft.

@aignas aignas marked this pull request as draft February 6, 2024 00:27
@aignas aignas marked this pull request as ready for review February 6, 2024 02:24
@aignas aignas changed the title fix(toolchain): attempt to fix the host toolchain on windows fix(toolchain): symlink all toolchain files for the host toolchain Feb 6, 2024
.bazelrc Show resolved Hide resolved
@aignas aignas requested a review from f0rmiga February 7, 2024 10:34
Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@f0rmiga f0rmiga added this pull request to the merge queue Feb 8, 2024
Merged via the queue into main with commit 74d576f Feb 8, 2024
7 checks passed
@aignas aignas deleted the fix/windows-host-toolchain branch February 9, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rules_python 0.29.0 started enforcing symlink usage on Windows (was: broke Bazel on Windows)
3 participants