Skip to content

Commit 20e5a3c

Browse files
committed
impl: remove log support
- Replace `log` crate with `mw_log` and provided Rust backend. - Bump toolchain version in CI.
1 parent 7f22bb6 commit 20e5a3c

File tree

24 files changed

+104
-225
lines changed

24 files changed

+104
-225
lines changed

.github/workflows/check.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
- uses: dtolnay/rust-toolchain@stable
3535
with:
36-
toolchain: 1.83.0
36+
toolchain: 1.90.0
3737
components: clippy, rustfmt
3838

3939
- name: Cargo Clippy
4040
run: |
41-
cargo clippy --all-targets --features logging -- -D warnings
41+
cargo clippy --all-targets --features stdout_logger -- -D warnings
4242
4343
- name: Cargo Fmt
4444
run: |
@@ -57,7 +57,7 @@ jobs:
5757

5858
- uses: dtolnay/rust-toolchain@stable
5959
with:
60-
toolchain: nightly-2024-12-17
60+
toolchain: nightly-2025-12-15
6161
components: miri, rust-src
6262

6363
- name: Install Clang
@@ -67,7 +67,7 @@ jobs:
6767
6868
- name: Cargo Miri
6969
run: |
70-
cargo +nightly-2024-12-17 miri test
70+
cargo +nightly-2025-12-15 miri test
7171
7272
cargo-coverage:
7373
runs-on: ubuntu-latest
@@ -76,16 +76,16 @@ jobs:
7676

7777
- uses: dtolnay/rust-toolchain@stable
7878
with:
79-
toolchain: nightly-2024-12-17
79+
toolchain: nightly-2025-12-15
8080
components: llvm-tools-preview, rust-src
8181

8282
- name: Install cargo-llvm-cov
8383
run: |
84-
cargo +nightly-2024-12-17 install cargo-llvm-cov --locked
84+
cargo +nightly-2025-12-15 install cargo-llvm-cov --locked
8585
8686
- name: Cargo llvm-cov
8787
run: |
88-
cargo +nightly-2024-12-17 llvm-cov --branch --tests --lib
88+
cargo +nightly-2025-12-15 llvm-cov --branch --tests --lib
8989
9090
rust-bazel:
9191
runs-on: ubuntu-latest

.github/workflows/component_integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Rust build environment
3535
uses: dtolnay/rust-toolchain@stable
3636
with:
37-
toolchain: 1.83.0
37+
toolchain: 1.90.0
3838

3939
- name: Setup Bazel
4040
uses: bazel-contrib/[email protected]

BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ load("//:project_config.bzl", "PROJECT_CONFIG")
2020
# - `:docs` for building documentation at build-time
2121
docs(
2222
data = [
23-
"@score_platform//:needs_json",
24-
"@score_process//:needs_json",
23+
# "@score_platform//:needs_json",
24+
# "@score_process//:needs_json",
2525
],
2626
source_dir = "docs",
2727
)

Cargo.lock

Lines changed: 36 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ edition = "2021"
1515
[workspace.dependencies]
1616
rust_kvs = { path = "src/rust/rust_kvs" }
1717
rust_kvs_tool = { path = "src/rust/rust_kvs_tool" }
18+
mw_log = { git = "https://github.com/eclipse-score/baselibs_rust.git", rev = "7b8ddb142ec4affe9c6a319b60f04302e96004f2", features = [
19+
"qm",
20+
] }
1821

1922
adler32 = "1.2.0"
2023
tinyjson = "2.5.1"

src/rust/rust_kvs/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
1515
rust_library(
1616
name = "rust_kvs",
1717
srcs = glob(["src/**/*.rs"]),
18-
crate_features = ["score-log"],
1918
visibility = ["//visibility:public"],
2019
deps = [
2120
"@score_baselibs_rust//src/log/mw_log",
@@ -27,7 +26,6 @@ rust_library(
2726
rust_test(
2827
name = "tests",
2928
crate = "rust_kvs",
30-
crate_features = ["score-log"],
3129
tags = [
3230
"unit_tests",
3331
"ut",

src/rust/rust_kvs/Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ edition.workspace = true
77
[dependencies]
88
adler32.workspace = true
99
tinyjson.workspace = true
10-
log = { version = "0.4.29", optional = true }
11-
12-
13-
[features]
14-
default = ["logging"]
15-
score-log = []
16-
logging = ["log"]
10+
mw_log.workspace = true
1711

1812

1913
[dev-dependencies]

src/rust/rust_kvs/src/error_code.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111

1212
extern crate alloc;
1313

14-
use crate::log::error;
1514
use alloc::string::FromUtf8Error;
1615
use core::array::TryFromSliceError;
16+
use mw_log::error;
1717

1818
/// Runtime Error Codes
19-
#[derive(Debug, PartialEq)]
20-
#[cfg_attr(feature = "score-log", derive(mw_log::ScoreDebug))]
19+
#[derive(Debug, PartialEq, mw_log::ScoreDebug)]
2120
pub enum ErrorCode {
2221
/// Error that was not yet mapped
2322
UnmappedError,

src/rust/rust_kvs/src/json_backend.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::error_code::ErrorCode;
1313
use crate::kvs_api::{InstanceId, SnapshotId};
1414
use crate::kvs_backend::KvsBackend;
1515
use crate::kvs_value::{KvsMap, KvsValue};
16-
use crate::log::{debug, error, trace};
16+
use mw_log::{debug, error, trace};
1717
use std::collections::HashMap;
1818
use std::fs;
1919
use std::path::{Path, PathBuf};
@@ -200,8 +200,7 @@ impl Default for JsonBackendBuilder {
200200
}
201201

202202
/// KVS backend implementation based on TinyJSON.
203-
#[derive(Clone, Debug, PartialEq)]
204-
#[cfg_attr(feature = "score-log", derive(mw_log::ScoreDebug))]
203+
#[derive(Clone, Debug, PartialEq, mw_log::ScoreDebug)]
205204
pub struct JsonBackend {
206205
working_dir: PathBuf,
207206
snapshot_max_count: usize,

0 commit comments

Comments
 (0)