Skip to content

Need for additional dependencies when using score_tooling #82

Description

@umaucher

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:

bazel_dep(name = "aspect_rules_lint", version = "1.10.2", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)

they should be defined in the module as such and come automatically.

Activity

  1. added theissue type on Oct 31, 2025
  2. RamakrishnanPK commented on Aug 24, 2026

    @RamakrishnanPK

    @umaucher - I can see already present in the main.

    bazel_dep(name = "aspect_rules_lint", version = "2.5.0")
    bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
    

    Is this issue still valid?

  3. umaucher commented on Oct 6, 2026

    @umaucher
    ContributorAuthor

    Still valid with score_tooling 2.3.1:

    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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions