-
Notifications
You must be signed in to change notification settings - Fork 541
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
--build_python_zip=false
broken on Windows
#1840
Comments
Well, now binaries/tests are incredibly slow. Good reminder why I was using it. |
It may not be linked to bzlmod after all, because it only adds an extension of top of previous functions. Surely this is due to upgrading from 0.19.0 😄 |
--build_python_zip=false
on Windows--build_python_zip=false
broken on Windows
Still not working with |
Could you test if this is still not working well with 0.29.0 please? That is before we switched to starlark implementation of the rules. |
@aignas Well, I tried to bisect. The flag still works in version As a side note, the code dealing with the zips has been added in |
Does head work for you? The latest commits may be of interest to you. |
#1929 with the optional features may be of interest. The features are off by default, so you have to enable them as per https://rules-python.readthedocs.io/en/latest/api/python/config_settings/index.html#bootstrap_impl I thought that this would have had some effect, but it might be the case that it is unrelated. Since none of the maintainers are developing on Windows, PRs are welcome to address this issue. |
@aignas I'm willing to contribute, but I need some guidance. I've tried to handle the case where the error is raised (quite simple with an extra Say there's a
In .../foobar.exe.runfiles/_main/path there's indeed no foobar file. However, there are foobar.exe, _foobar, and _foobar.exe. These three files are symlinks back to generated files just before the runfiles tree (e.g. If my guess is correct, foobar.exe should spawn / be looking for ...runfiles/_main/path/_foobar.exe, rather than ...runfiles//main/path/foobar. The problem is, I have no idea where to change that. Any explanation is welcome. |
Well I had time to look at it again. @aignas please have a look at the PR! |
This fixes #1840 by supporting again `--build_python_zip=false` on Windows. When the zip file isn't build, the transition executable looks for the eponymous bootstrap script but the latter doesn't exist. I've just added a symlink, and refactored a bit because logic would have been duplicated. It seems you don't run CICD on Windows. FWIW I've manually tested it, both with `build_python_zip` as `true` and `false`. --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com>
This is a more comprehensive regression test for verifying `--build_python_zip` is actually working (#1840) This also creates a small framework to make it easier to write integration tests that need to customize the environment bazel runs in and check the output of bazel itself. I figure this will be helpful for writing simple verification tests for repository/bzlmod phase logic (i.e. set the debug env vars and grep the output). While we should avoid heavy usage of these bazel-in-bazel tests, a bit of grepping logs would go a long way for covering edge cases that examples don't cover.
🐞 bug report
Affected Rule
The issue is caused by the function **_transition_py_impl** so impacts **py_binary** and **py_test**.Is this a regression?
The bug was not present with WORKSPACE method.
Description
I can't use
--build_python_zip=false
anymore.However this might not be a bad thing. I've put that in
.bazelrc
a long time ago, when I had some troubles with caches. Maybe this is not needed anyway.🔬 Minimal Reproduction
Any repo using
rules_python
with bzlmod on Windows, I guess.🔥 Exception or Error
From what I understand, because
zipfile
is stillNone
, because the previous loop didn't find any zip file in the runfiles.🌍 Your Environment
Operating System: Windows 10 x64
Output of
bazel version
:Rules_python version: 0.31.0
The text was updated successfully, but these errors were encountered: