-
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 extension breaks cc toolchain resolution during cross compiling on darwin arm64 #1825
Comments
From the first glance I am not sure how this is gazelle plugin's problem. What kind of toolchains do you have cotfigured to build gazelle? I don't see anything about it in the repro. |
we just use normal golang toolchain https://github.com/xytan0056/cgo_test/blob/30a62b2654561f0d08e98dbf14c2e6a7c8d55e74/WORKSPACE#L193 The problem is cross-compilation of gazelle works all good before enabling the python extension |
I think this is because we include a The code in question is here: rules_python/gazelle/python/BUILD.bazel Line 70 in 4be00a6
@alexeagle has mentioned in a94deb8 that they may be working on a better version for their Note, that in #1485 we discussed about the effect of that change breaking cross-compilation, but I am not sure if it is documented in README. |
Actually, the root cause is in py_binary, not the zip file. Created a separate ticket with reproduction: #1857. |
Closing this ticket as fixing #1857 would fix this as well. |
Re-opening because there is a PR that will address the cross-building of the gazelle plugin. |
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
🐞 bug report
Affected Rule
gazelle extensionIs this a regression?
No, previous versions also has this issueDescription
After enabling python extension in gazelle
https://github.com/xytan0056/cgo_test/blob/30a62b2654561f0d08e98dbf14c2e6a7c8d55e74/BUILD.bazel#L22
We cannot cross compile gazelle on "darwin arm64" to "darwin amd64" with
--incompatible_enable_cc_toolchain_resolution
🔬 Minimal Reproduction
https://github.com/xytan0056/cgo_test/tree/30a62b2654561f0d08e98dbf14c2e6a7c8d55e74
fails
🔥 Exception or Error
The error is gone when either
--noincompatible_enable_cc_toolchain_resolution
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: