You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need for additional dependencies when using score_tooling #82
use_format_targets() in third_party/format/macros.bzl passes the formatter labels as plain strings. These resolve in the consumer's repo mapping, so consumers still need their own bazel_deps:
$ bazel build //:format.check
ERROR: ... No repository visible as '@aspect_rules_lint' from main repository
Fix: wrap the labels in Label() so they resolve in score_tooling's repo. Verified in persistency with both deps removed and --override_module=score_tooling=<local>: format.check passes (fails without the patch).
_FORMATTERS = {
- "python": ("python", "@aspect_rules_lint//format:ruff"),- "rust": ("rust", "@score_tooling//third_party/format:rustfmt_with_policies"),- "starlark": ("starlark", "@buildifier_prebuilt//:buildifier"),- "yaml": ("yaml", "@aspect_rules_lint//format:yamlfmt"),+ "python": ("python", Label("@aspect_rules_lint//format:ruff")),+ "rust": ("rust", Label("//third_party/format:rustfmt_with_policies")),+ "starlark": ("starlark", Label("@buildifier_prebuilt//:buildifier")),+ "yaml": ("yaml", Label("@aspect_rules_lint//format:yamlfmt")),+ # Plain string: the `llvm` extension is root-module-only, so @llvm_toolchain must come from the consumer.
"cpp": ("cc", "@llvm_toolchain//:clang-format"),
}
Notes:
cpp stays a plain string: toolchains_llvm only allows its llvm extension in the root module, so score_tooling can't provide @llvm_toolchain.
The standalone score_format_checker module is obsolete (registry-marked) and has the same flaw. Consumers should load @score_tooling//third_party/format:macros.bzl instead.
In the PR to switch / update to the score_tooling module (see https://github.com/eclipse-score/persistency/pull/155/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR75) it is needed to also specify / provide the implicit dependencies:
they should be defined in the module as such and come automatically.