-
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
Gazelle failing when executed from within a virtual environment #1599
Comments
Just a short message, that I can reproduce the error and I can reproduce it with |
I do not know if this is related, but I bumped rules_python from v0.25.0 to v.0.31.0 but have not investigate where the issue might have need originated. When I specify a package to run gazelle under, it fails with a similar error as above (I'm not running in venv). So, if I run:
if I don't specify a package, I never get a failure. |
Remove gazelle plugin's python deps and make it hermetic. No more relying on the system interpreter. Use TreeSitter to parse Python code and use https://github.com/pypi/stdlib-list to determine whether a module is in std lib. Fixes #1825 Fixes #1599 Related #1315
My hope is that #1929 should help with this issue. |
Closing as the latest code is using golang, so should not be affected by Python virtual envs. |
Has the 'fix' been released? In which version? |
It will be in the next release,
…On 4 June 2024 18:16:45 GMT+09:00, Paul Salaberria ***@***.***> wrote:
> Closing as the latest code is using golang, so should not be affected by Python virtual envs.
Has the 'fix' been released? In which version?
--
Reply to this email directly or view it on GitHub:
#1599 (comment)
You are receiving this because you modified the open/close state.
Message ID: ***@***.***>
|
🐞 bug report
Affected Rule
The issue is caused by the Gazelle Python plugin.Is this a regression?
Yes, the previous version in which this bug was not present was: 0.26.0Description
Gazelle (with the Python plugin enabled) crashes when executed from within a virtual environment.🔬 Minimal Reproduction
A reproduction can be found at https://github.com/psalaberria002/rules_python_gazelle_repro.
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
It started to break in 1.27.0, and 1.27.1 doesn't solve it.
Running Gazelle from outside the venv works as expected.
I have also tried creating the virtual environment with
python -m venv .venv
to rule out any possible issueswith our rules_pyvenv, but it also fails with the same error.
The text was updated successfully, but these errors were encountered: