bazel-contrib / target-determinator

Determines which Bazel targets were affected between two git commits.
Apache License 2.0
144 stars 22 forks source link

When using with bzlmod rules_python encounter error with Bazel 6.4.0 #76

Closed mark-thm closed 12 months ago

mark-thm commented 12 months ago

After upgrading to Bazel 6.4.0 I encountered the following error while running target-determinator:

label parse error: repository has invalid characters: "@@rules_python~0.26.0~python~python_3_10_x86_64-unknown-linux-gnu//:python_runtimes"

Either Gazelle or target-determinator is going to need to strip one of the @s.

I filed https://github.com/bazelbuild/bazel-gazelle/issues/1650 on Gazelle and proposed a fix in https://github.com/bazelbuild/bazel-gazelle/pull/1651. If the fix is accepted, we can just upgrade the Gazelle dependency. If not, we can work around the issue in https://github.com/bazel-contrib/target-determinator/blob/c1521bb5deb6d8028c4ae6f3f5d57c5e5122abff/pkg/target_determinator.go#L922C1-L922C1.