Skip to content

Commit 2c91b6f

Browse files
committed
MODULE.bazel: Update and cleanup
Cleanup: - Only define needed parts get rid of unused parts - Use score_tooling for all helpers Update: - Update all modules to latest available versions - Update bazel to 8.4.1 - Update toolchains (llvm: 21.1.0, rust: 2024 1.90.0) - Update toolchain settings to avoid errors (similar as done in baselibs as such) - Fix error when using latest rust version (backward compatible)
1 parent 5804238 commit 2c91b6f

File tree

5 files changed

+22
-70
lines changed

5 files changed

+22
-70
lines changed

.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
build --java_language_version=17
2-
build --tool_java_language_version=17
3-
build --java_runtime_version=remotejdk_17
4-
build --tool_java_runtime_version=remotejdk_17
5-
61
build --@score-baselibs//score/json:base_library=nlohmann
72
build --@score-baselibs//score/mw/log/flags:KRemote_Logging=False
83

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.0
1+
8.4.1

BUILD

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14-
load("@score_cli_helper//:cli_helper.bzl", "cli_helper")
15-
load("@score_cr_checker//:cr_checker.bzl", "copyright_checker")
16-
load("@score_dash_license_checker//:dash.bzl", "dash_license_checker")
14+
load("@score_tooling//:defs.bzl", "cli_helper", "copyright_checker", "dash_license_checker", "setup_starpls", "use_format_targets")
15+
1716
load("@score_docs_as_code//:docs.bzl", "docs")
18-
load("@score_format_checker//:macros.bzl", "use_format_targets")
19-
load("@score_starpls_lsp//:starpls.bzl", "setup_starpls")
2017
load("//:project_config.bzl", "PROJECT_CONFIG")
2118

2219
# Creates all documentation targets:
@@ -41,8 +38,8 @@ copyright_checker(
4138
"//:BUILD",
4239
"//:MODULE.bazel",
4340
],
44-
config = "@score_cr_checker//resources:config",
45-
template = "@score_cr_checker//resources:templates",
41+
config = "@score_tooling//cr_checker/resources:config",
42+
template = "@score_tooling//cr_checker/resources:templates",
4643
visibility = ["//visibility:public"],
4744
)
4845

MODULE.bazel

Lines changed: 16 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,71 +17,44 @@ module(
1717
)
1818

1919
## Toolchains (dependencies and config)
20-
# python
21-
bazel_dep(name = "rules_python", version = "1.4.1")
22-
23-
PYTHON_VERSION = "3.12"
24-
25-
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
26-
python.toolchain(
27-
is_default = True,
28-
python_version = PYTHON_VERSION,
29-
)
30-
use_repo(python)
31-
3220
# rust
33-
bazel_dep(name = "rules_rust", version = "0.56.0")
21+
bazel_dep(name = "rules_rust", version = "0.65.0")
3422

3523
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
3624
rust.toolchain(
37-
edition = "2021",
38-
versions = ["1.85.0"],
25+
edition = "2024",
26+
versions = ["1.90.0"],
3927
)
4028

4129
# LLVM Toolchains Rules - host configuration
42-
bazel_dep(name = "rules_cc", version = "0.1.1")
43-
bazel_dep(name = "toolchains_llvm", version = "1.2.0")
30+
bazel_dep(name = "rules_cc", version = "0.2.8")
31+
bazel_dep(name = "toolchains_llvm", version = "1.5.0")
4432

4533
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
4634
llvm.toolchain(
35+
compile_flags = {"": [
36+
"-Wno-error=deprecated-declarations",
37+
"-Wno-error=deprecated-literal-operator",
38+
]},
4739
cxx_standard = {"": "c++17"},
48-
llvm_version = "19.1.0",
40+
llvm_version = "21.1.0",
4941
)
5042
use_repo(llvm, "llvm_toolchain")
51-
use_repo(llvm, "llvm_toolchain_llvm")
5243

5344
register_toolchains("@llvm_toolchain//:all")
5445

5546
## Bazel registry
5647
# Module dependencies
57-
bazel_dep(name = "googletest", version = "1.15.0")
48+
bazel_dep(name = "googletest", version = "1.17.0")
5849
bazel_dep(name = "google_benchmark", version = "1.9.4")
5950

6051
## S-CORE bazel registry
61-
# Checker rule for CopyRight checks/fixs
62-
bazel_dep(name = "score_cr_checker", version = "0.3.1")
63-
64-
# Starlark language server
65-
bazel_dep(name = "score_starpls_lsp", version = "0.1.0")
66-
67-
#Dash license checker
68-
bazel_dep(name = "score_dash_license_checker", version = "0.1.2")
69-
70-
# Format checker
71-
bazel_dep(name = "score_format_checker", version = "0.1.1")
72-
bazel_dep(name = "aspect_rules_lint", version = "1.4.4")
52+
bazel_dep(name = "score_tooling", version = "1.0.2")
53+
bazel_dep(name = "aspect_rules_lint", version = "1.7.0")
7354
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
7455

7556
# docs-as-code
76-
bazel_dep(name = "score_docs_as_code", version = "1.0.1")
77-
78-
# Provides, pytest & venv
79-
bazel_dep(name = "score_python_basics", version = "0.3.4")
80-
bazel_dep(name = "score_platform", version = "0.3.0")
81-
bazel_dep(name = "score_process", version = "1.1.0")
82-
83-
# cli helper
84-
bazel_dep(name = "score_cli_helper", version = "0.1.2")
57+
bazel_dep(name = "score_docs_as_code", version = "1.2.0")
8558

8659
# Module deps
8760
bazel_dep(name = "score-baselibs", version = "0.0.0")
@@ -106,25 +79,12 @@ use_repo(crate, "score_persistency_crates")
10679
bazel_dep(name = "testing-utils")
10780
git_override(
10881
module_name = "testing-utils",
109-
commit = "a847c7464cfa47e000141631d1223b92560d2e58", # tag v0.2.0
82+
commit = "4f9f2544a7b34288d36be120fa1acf4b57859600", # tag v0.2.3
11083
remote = "https://github.com/qorix-group/testing_tools.git",
11184
)
11285

113-
git_override(
114-
module_name = "score_docs_as_code",
115-
commit = "13ba715a95cfe85158b60d7f4748ba8e28895d8c",
116-
remote = "https://github.com/eclipse-score/docs-as-code.git",
117-
)
118-
119-
#bazel_dep on module 'rules_boost' has no version -> override needed
120-
archive_override(
121-
module_name = "rules_boost",
122-
strip_prefix = "rules_boost-master",
123-
urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"],
124-
)
125-
12686
git_override(
12787
module_name = "score-baselibs",
128-
commit = "46923f5c4f302bd9feae0261588687aaf32e3c5c",
88+
commit = "b96af70bec2fd77fc7e7b3b26fd01d5f5eec9d5d",
12989
remote = "https://github.com/eclipse-score/baselibs.git",
13090
)

src/rust/rust_kvs/src/kvs_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ macro_rules! impl_tryfrom_kvs_value_to_t {
9090
impl std::convert::TryFrom<&KvsValue> for $to {
9191
type Error = String;
9292
fn try_from(value: &KvsValue) -> Result<Self, Self::Error> {
93-
if let KvsValue::$variant(ref n) = value {
93+
if let KvsValue::$variant(n) = value {
9494
Ok(n.clone())
9595
} else {
9696
Err(format!("KvsValue is not a {}", stringify!($to)))

0 commit comments

Comments
 (0)