-
-
Notifications
You must be signed in to change notification settings - Fork 617
Description
π bug report
Affected Rule
Using @rules_python_gazelle_plugin//python
in the language
array of a gazelle_binary
rule.
Is this a regression?
No
Description
Running gazelle_binary
with the @rules_python_gazelle_plugin//python
plugin, along with another plugin that depends on github.com/smacker/go-tree-sitter
fails to build.
π¬ Minimal Reproduction
https://github.com/Olsworn/rules_python_gazelle_smacker
π₯ Exception or Error
package conflict error: github.com/smacker/go-tree-sitter: multiple copies of package passed to linker:
@@rules_python_gazelle_plugin++_repo_rules+com_github_smacker_go_tree_sitter//
@@gazelle++go_deps+com_github_smacker_go_tree_sitter//
π Your Environment
Operating System:
linux_amd64
Output of bazel version
:
8.3.1
Rules_python version:
1.5.1 patched with the latest changes from "main".
Or specifically the commit which interests us from: #3069
Anything else relevant?
It seems like the issue is caused by the patch on: com_github_smacker_go_tree_sitter
rules_python/gazelle/MODULE.bazel
Lines 31 to 39 in 7682924
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
http_archive( | |
name = "com_github_smacker_go_tree_sitter", | |
build_file = "//:internal/smacker_BUILD.bazel", | |
integrity = "sha256-4AkDY4Rh5Auu9Kwzhj5XYSirMLlhmd6ClMWo/r0kmu4=", | |
strip_prefix = "go-tree-sitter-dd81d9e9be82a8cac96ed1d50c7389c5f1997c02", | |
url = "https://github.com/smacker/go-tree-sitter/archive/dd81d9e9be82a8cac96ed1d50c7389c5f1997c02.zip", | |
) |
I am not sure what the patch adding various header files to github.com/smacker/go-tree-sitter/python
is supposed to help with, but our setup seems to run fine without it, and does not produce any diff when running gazelle after removing that patch.
Just removing that patch might lead to other issues that I am not aware of though.