From cafd50525a5f95ca962d789425839ca9621f6c14 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Mon, 20 Jul 2026 11:14:19 +0200 Subject: [PATCH] use exported binaries --- MODULE.bazel | 23 ++++++----------------- MODULE.bazel.lock | 4 +--- tools/format/BUILD | 30 ++++++++++++++++++++++++------ 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index b442ef1833a..13913d513bd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -40,14 +40,6 @@ bazel_dep(name = "aspect_rules_py", version = "1.6.6", dev_dependency = True) ############################################################################### bazel_dep(name = "rules_pkg", version = "1.1.0") -############################################################################### -# -# Buildifier dependency -# Provides formatting and linting of Bazel files. -# -############################################################################### -bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") - ############################################################################### # # Generic linting and formatting rules @@ -71,13 +63,10 @@ bazel_dep(name = "score_tooling", version = "1.1.2") bazel_dep(name = "score_docs_as_code", version = "4.6.1") bazel_dep(name = "score_process", version = "2.0.1") -# Due to bazels resolution strategy, the following dependency graph is created: -# score_process@1.5.4 (selected) -# → score_docs_as_code@4.0.1 (discovered, not selected) -# → score_process@1.5.3 (discovered, not selected) -# → score_tooling@1.2.0 ← this requirement sticks, although neither -# the old docs-as-code nor the old process module is selected. -single_version_override( - module_name = "score_tooling", - version = "1.1.2", +# Provide the tools from the devcontainer to Bazel +bazel_dep(name = "score_devcontainer", version = "1.8.0", dev_dependency = True) +git_override( + module_name = "score_devcontainer", + commit = "d4d7582b183264e537bd3912514ba3a41612141f", + remote = "https://github.com/eclipse-score/devcontainer.git", ) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index b94326c6a34..c58ca2808cb 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -426,9 +426,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.7.0/MODULE.bazel": "f9a5971fbd05f0ed14e7a373dbf58af72a5c58d081537a75c314daaf61c92ae9", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.8.0/MODULE.bazel": "89f855b94d041d2e61ff9667562fb4539c146249f6fb4c5dddf3d13bb9064aa7", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.8.0/source.json": "ef316fad71fdbd53daf43fc0a82fbc7c293908a2712214ff79134c177d028024", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.3.3/MODULE.bazel": "95d2b7d44d461c1cf9bd016605f740716fd4ea1303f5f2ed93de3566b90feb1b", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.0-RC1/MODULE.bazel": "e118b5cbdc453cde83b5ce481107d8e4a713d3458550b9d10445046d4bba2ff3", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.0/MODULE.bazel": "a3ad204b7412c02a899034d78de62b5549bafba5530a256d1007cb3f4ed20a11", @@ -457,6 +454,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.4/MODULE.bazel": "53bd16dfbb1fb8ecf6822fb26f9f4e8333bac7b14d12bb02bf84078063820a31", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_rust_policies/0.0.2/MODULE.bazel": "ade2bad4a331b02d9b7e7d9842e8de8c6fded6186486e02c4f7db5cd4b71d34d", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_rust_policies/0.0.2/source.json": "fbcbc738e652b0c68d5d28dd1db09f2e643dc111f5739b2f6af7ec56c2e88043", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_tooling/1.0.2/MODULE.bazel": "e70f396375b9d612b4f41ebceff7f18f68ab423b14625c138a354cc01bc62a10", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_tooling/1.1.2/MODULE.bazel": "56d08309931cfad67c2b6691207bb5f761a3946830d620c630d2436630e6b499", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_tooling/1.1.2/source.json": "f37e462ac9bb3bca49b944ed51e7b932b3822ff434a56c6cc5e1288ff5a9db01", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/stardoc/0.5.0/MODULE.bazel": "not found", diff --git a/tools/format/BUILD b/tools/format/BUILD index 3bf7c6dd94a..213021538fe 100644 --- a/tools/format/BUILD +++ b/tools/format/BUILD @@ -13,24 +13,42 @@ load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test") +alias( + name = "yamlfmt_binary", + actual = "@score_devcontainer//tools:yamlfmt_binary", + visibility = ["//visibility:public"], +) + +alias( + name = "ruff_binary", + actual = "@score_devcontainer//tools:ruff_binary", + visibility = ["//visibility:public"], +) + +alias( + name = "buildifier_binary", + actual = "@score_devcontainer//tools:buildifier_binary", + visibility = ["//visibility:public"], +) + format_multirun( name = "format.fix", - python = "@aspect_rules_lint//format:ruff", - starlark = "@buildifier_prebuilt//:buildifier", + python = ":ruff_binary", + starlark = ":buildifier_binary", visibility = [ "//visibility:public", ], - yaml = "@aspect_rules_lint//format:yamlfmt", + yaml = ":yamlfmt_binary", ) format_test( name = "format.check", no_sandbox = True, - python = "@aspect_rules_lint//format:ruff", - starlark = "@buildifier_prebuilt//:buildifier", + python = ":ruff_binary", + starlark = ":buildifier_binary", visibility = [ "//visibility:public", ], workspace = "//:MODULE.bazel", - yaml = "@aspect_rules_lint//format:yamlfmt", + yaml = ":yamlfmt_binary", )