Open SimonVleugels opened 1 year ago
I have not tested bazel-diff with bazelmod at all yet. I likely need to add support
Hi, @tinder-maxwellelliott , any plan to test bzlmod?
Any plan to support bzlmod? Not entirely sure but I think we have seen bazel-diff not able to find any impacted targets for a bzlmod project. I can try to prepare a repro.
Any plan to support bzlmod? Not entirely sure but I think we have seen bazel-diff not able to find any impacted targets for a bzlmod project. I can try to prepare a repro.
I put up a repro here https://github.com/honnix/bazel-diff-bzlmod-repro.
It seems to be the --useCquery
being problematic.
I did some debugging and I think the problem might boil down to the canonical repo name.
compatibleTargetSet
here has @@//:BUILD.bazel
, @@//:hello
and @@//:hello.py
, while cqueryResult
here has //:BUILD.bazel
, //:hello
and //:hello.py
instead.
The canonical repo name is one of the changes made in bzlmod as I remember I read it somewhere.
I did a naive hack cqueryResult.resultsList.filter { it.target.rule.name in compatibleTargetSet || "@@${it.target.rule.name}" in compatibleTargetSet }.map { it.target }
and this could give the expected impacted target.
Hi, I'm trying to use bazel-diff with bzlmod enabled using only local_repositories (no connection to bcr). I'm getting unknown repo errors:
Bazel command:
Not sure what I'm doing wrong.
BUILD.bazel
MODULE.bazel
WORKSPACE