Description
Hi,
I noticed some issue with bazel-diff in my local setup. I use bazel 8.1.0 and bazel-diff 9.0.0
If I use bazel-diff with parameter "--fineGrainedHashExternalRepos @rules_cc", I get the error:
ERROR: error loading package under directory '': error loading package '@@rules_cc+//tests/system_library': Unable to find package for @@[unknown repo 'rules_shell' requested from @@rules_cc+]//shell:sh_test.bzl: The repository '@@[unknown repo 'rules_shell' requested from @@rules_cc+]' could not be resolved: No repository visible as '@rules_shell' from repository '@@rules_cc+'.
It's probably related to this issue: https://stackoverflow.com/questions/79374099/bazel-8-no-such-package-unknown-repo-platforms-requested-from-os
I added "rules_shell" directly to my MODULE.bazel but no success:
bazel_dep(name = "rules_shell", version = "0.2.0")
MODULE.bazel file content:
module(
name = "my-module",
version = "0.0.1",
)
bazel_dep(name = "rules_cc", version = "0.1.1")
# bazel_dep(name = "rules_shell", version = "0.2.0")
http_jar = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar")
http_jar(
name = "bazel_diff",
sha256 = "5f36e74a8d6167e4d31f663526a63be3e3728456d8b5b4a84503315dd10e65e7",
urls = [
"https://github.com/Tinder/bazel-diff/releases/download/9.0.0/bazel-diff_deploy.jar",
],
)
Root BUILD file:
java_binary(
name = "bazel-diff",
main_class = "com.bazel_diff.Main",
runtime_deps = ["@bazel_diff//jar"],
)
Bazel-diff command:
bazel run --verbose_failures :bazel-diff -- generate-hashes --keep_going --fineGrainedHashExternalRepos @rules_cc --workspacePath=<workspace-dir> "/tmp/hashes.json"
Any advice appreciated.