Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ rust_coverage_report(
"bl-x86_64-linux",
"ferrocene-coverage",
],
query = 'kind("rust_test", //score/...) except //score/log_rust/score_log_fmt_macro:tests',
query = 'kind("rust_test", //score/...) except //score/mw/log/rust/score_log_fmt_macro:tests',
visibility = ["//visibility:public"],
)

Expand Down
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ default-members = [
"score/allocator",
"score/pal",
"score/thread",
"score/log_rust/score_log_fmt_macro",
"score/log_rust/stdout_logger",
"score/mw/log/rust/score_log_fmt_macro",
"score/mw/log/rust/stdout_logger",
"score/testing_macros",
]
# Include tests and examples as a member for IDE support and Bazel builds.
Expand All @@ -32,10 +32,10 @@ members = [
"score/allocator",
"score/pal",
"score/thread",
"score/log_rust/score_log",
"score/log_rust/score_log_fmt",
"score/log_rust/score_log_fmt_macro",
"score/log_rust/stdout_logger",
"score/mw/log/rust/score_log",
"score/mw/log/rust/score_log_fmt",
"score/mw/log/rust/score_log_fmt_macro",
"score/mw/log/rust/stdout_logger",
"score/testing_macros",
"examples/log_builtin",
"examples/log_custom",
Expand All @@ -50,10 +50,10 @@ readme = "README.md"

[workspace.dependencies]
containers = { path = "score/containers_rust" }
score_log = { path = "score/log_rust/score_log" }
score_log_fmt = { path = "score/log_rust/score_log_fmt" }
score_log_fmt_macro = { path = "score/log_rust/score_log_fmt_macro" }
stdout_logger = { path = "score/log_rust/stdout_logger" }
score_log = { path = "score/mw/log/rust/score_log" }
score_log_fmt = { path = "score/mw/log/rust/score_log_fmt" }
score_log_fmt_macro = { path = "score/mw/log/rust/score_log_fmt_macro" }
stdout_logger = { path = "score/mw/log/rust/stdout_logger" }
allocator = { path = "score/allocator" }
testing_macros = { path = "score/testing_macros" }
pal = { path = "score/pal" }
Expand Down
4 changes: 2 additions & 2 deletions examples/log_builtin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rust_binary(
name = "log_builtin",
srcs = glob(["src/**/*.rs"]),
deps = [
"//score/log_rust/score_log",
"//score/log_rust/stdout_logger",
"//score/mw/log/rust/score_log",
"//score/mw/log/rust/stdout_logger",
],
)
6 changes: 3 additions & 3 deletions examples/log_cpp_init/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ rust_static_library(
edition = "2021",
visibility = ["//visibility:private"],
deps = [
"//score/log_rust/score_log",
"//score/log_rust/stdout_logger",
"//score/mw/log/rust/score_log",
"//score/mw/log/rust/stdout_logger",
],
)

Expand All @@ -32,6 +32,6 @@ cc_binary(
visibility = ["//visibility:public"],
deps = [
":example_lib",
"//score/log_rust/stdout_logger_cpp_init",
"//score/mw/log/rust/stdout_logger_cpp_init",
],
)
2 changes: 1 addition & 1 deletion examples/log_custom/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ rust_binary(
name = "log_custom",
srcs = glob(["src/**/*.rs"]),
deps = [
"//score/log_rust/score_log",
"//score/mw/log/rust/score_log",
],
)
2 changes: 1 addition & 1 deletion score/allocator/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rust_library(
edition = "2021",
visibility = ["//visibility:public"],
deps = [
"//score/log_rust/score_log",
"//score/mw/log/rust/score_log",
],
)

Expand Down
2 changes: 1 addition & 1 deletion score/containers_rust/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rust_library(
visibility = ["//visibility:public"],
deps = [
"//score/allocator",
"//score/log_rust/score_log",
"//score/mw/log/rust/score_log",
],
)

Expand Down
24 changes: 5 additions & 19 deletions score/log_rust/score_log/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -10,25 +10,11 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
alias(
name = "score_log",
srcs = glob(["**/*.rs"]),
proc_macro_deps = [
"//score/log_rust/score_log_fmt_macro",
],
actual = "//score/mw/log/rust/score_log:score_log",
deprecation = "//score/log_rust/score_log:score_log has moved to //score/mw/log/rust/score_log:score_log. " +
"Update your dependency to the new //score/mw/... label.",
visibility = ["//visibility:public"],
deps = [
"//score/log_rust/score_log_fmt",
],
)

rust_test(
name = "tests",
crate = "score_log",
tags = [
"unit_tests",
"ut",
],
)
27 changes: 5 additions & 22 deletions score/log_rust/stdout_logger/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -11,27 +11,10 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

"""
`stdout_logger` is a testing/development backend for logging.
For production use `score_logging`.
"""

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
alias(
name = "stdout_logger",
srcs = glob(["**/*.rs"]),
actual = "//score/mw/log/rust/stdout_logger:stdout_logger",
deprecation = "//score/log_rust/stdout_logger:stdout_logger has moved to //score/mw/log/rust/stdout_logger:stdout_logger. " +
"Update your dependency to the new //score/mw/... label.",
visibility = ["//visibility:public"],
deps = [
"//score/log_rust/score_log",
],
)

rust_test(
name = "tests",
crate = "stdout_logger",
tags = [
"unit_tests",
"ut",
],
)
28 changes: 6 additions & 22 deletions score/log_rust/stdout_logger_cpp_init/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -11,27 +11,11 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_rust//rust:defs.bzl", "rust_static_library")

rust_static_library(
name = "ffi",
srcs = ["ffi.rs"],
edition = "2021",
visibility = ["//visibility:private"],
deps = [
"//score/log_rust/score_log",
"//score/log_rust/stdout_logger",
],
)

cc_library(
alias(
name = "stdout_logger_cpp_init",
srcs = ["stdout_logger_init.cpp"],
hdrs = ["stdout_logger_init.h"],
include_prefix = "score/mw/log/rust",
actual = "//score/mw/log/rust/stdout_logger_cpp_init:stdout_logger_cpp_init",
deprecation = "//score/log_rust/stdout_logger_cpp_init:stdout_logger_cpp_init has moved to " +
"//score/mw/log/rust/stdout_logger_cpp_init:stdout_logger_cpp_init. " +
"Update your dependency to the new //score/mw/... label.",
visibility = ["//visibility:public"],
deps = [
":ffi",
],
)
4 changes: 2 additions & 2 deletions score/mw/log/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# *******************************************************************************

Check failure on line 1 in score/mw/log/BUILD

View workflow job for this annotation

GitHub Actions / Restricted file changes

score/mw/log/BUILD is in a restricted path
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
Expand Down Expand Up @@ -386,7 +386,7 @@
":minimal",
":recorder_mock",
"@googletest//:gtest_main",
"@score_baselibs//score/mw/log/test/my_custom_lib:my_custom_type_mw_log",
"@score_baselibs//score/mw/log/tests/my_custom_lib:my_custom_type_mw_log",
],
)

Expand Down Expand Up @@ -486,7 +486,7 @@
"@score_baselibs//score/mw/log/configuration:unit_tests",
"@score_baselibs//score/mw/log/detail:unit_tests",
#"@score_baselibs//score/mw/log/legacy_non_verbose_api:unit_tests",
#"@score_baselibs//score/mw/log/test:unit_test_suite",
#"@score_baselibs//score/mw/log/tests:unit_test_suite",
],
visibility = [
"//platform/aas/mw:__pkg__",
Expand Down
6 changes: 3 additions & 3 deletions score/mw/log/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Table of Contents

Check failure on line 1 in score/mw/log/README.md

View workflow job for this annotation

GitHub Actions / Restricted file changes

score/mw/log/README.md is in a restricted path

[Introduction](#introduction)

Expand Down Expand Up @@ -360,7 +360,7 @@
The primary assumption is to **have separate library** for each custom user type.
Thus the first step is to create separate directory. For the purpose of presenting
an example there was a directory created inside `mw/log` test directory, e.g.:
`mw/log/test/my_custom_lib` and create `BUILD` file there, e.g.:
`mw/log/tests/my_custom_lib` and create `BUILD` file there, e.g.:

```bazel
cc_library(
Expand Down Expand Up @@ -420,7 +420,7 @@

```c++
#include "mw/log/log_stream.h"
#include "mw/log/test/my_custom_lib/my_custom_type.h"
#include "mw/log/tests/my_custom_lib/my_custom_type.h"

namespace my
{
Expand Down Expand Up @@ -510,7 +510,7 @@

```c++
#include "mw/log/logstream.h"
#include "mw/log/test/my_custom_lib/my_custom_type.h"
#include "mw/log/tests/my_custom_lib/my_custom_type.h"

namespace my
{
Expand Down
2 changes: 1 addition & 1 deletion score/mw/log/configuration/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# *******************************************************************************

Check failure on line 1 in score/mw/log/configuration/BUILD

View workflow job for this annotation

GitHub Actions / Restricted file changes

score/mw/log/configuration/BUILD is in a restricted path
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
Expand Down Expand Up @@ -172,7 +172,7 @@
"@score_baselibs//score/os/mocklib:stdlib_mock",
"@score_baselibs//score/os/mocklib:unistd_mock",
"@score_baselibs//score/os/utils/mocklib:path_mock",
#"@score_baselibs//score/mw/log/test/console_logging_environment",
#"@score_baselibs//score/mw/log/tests/console_logging_environment",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO those commented-out lines should be removed separately.

"@googletest//:gtest_main",
],
)
Expand Down
4 changes: 2 additions & 2 deletions score/mw/log/detail/text_recorder/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# *******************************************************************************

Check failure on line 1 in score/mw/log/detail/text_recorder/BUILD

View workflow job for this annotation

GitHub Actions / Restricted file changes

score/mw/log/detail/text_recorder/BUILD is in a restricted path
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
Expand Down Expand Up @@ -171,7 +171,7 @@
"@score_baselibs//score/os/utils/mocklib:path_mock",
"@score_baselibs//score/mw/log/detail:backend_mock",
"@score_baselibs//score/mw/log/detail:circular_allocator",
#"@score_baselibs//score/mw/log/test/console_logging_environment",
#"@score_baselibs//score/mw/log/tests/console_logging_environment",
"@googletest//:gtest_main",
],
)
Expand Down Expand Up @@ -212,7 +212,7 @@
deps = [
":non_blocking_writer",
"@score_baselibs//score/os/mocklib:unistd_mock",
#"@score_baselibs//score/mw/log/test/console_logging_environment",
#"@score_baselibs//score/mw/log/tests/console_logging_environment",
"@googletest//:gtest_main",
],
)
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion score/mw/log/log_stream_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "score/mw/log/log_stream_factory.h"
#include "score/mw/log/recorder_mock.h"
#include "score/mw/log/runtime.h"
#include "score/mw/log/test/my_custom_lib/my_custom_type_mw_log.h"
#include "score/mw/log/tests/my_custom_lib/my_custom_type_mw_log.h"

#include "gtest/gtest.h"

Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions score/mw/log/rust/score_log/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
name = "score_log",
srcs = glob(["**/*.rs"]),
proc_macro_deps = [
"//score/mw/log/rust/score_log_fmt_macro",
],
visibility = ["//visibility:public"],
deps = [
"//score/mw/log/rust/score_log_fmt",
],
)

rust_test(
name = "tests",
crate = "score_log",
tags = [
"unit_tests",
"ut",
],
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ rust_library(
name = "score_log_fmt",
srcs = glob(["**/*.rs"]),
crate_features = select({
"//score/log_rust:safety_level_qm": ["qm"],
"//score/log_rust:safety_level_asil_b": [],
"//score/mw/log/rust:safety_level_qm": ["qm"],
"//score/mw/log/rust:safety_level_asil_b": [],
}),
visibility = [
"//score/log_rust/score_log:__pkg__",
"//score/log_rust/score_log_fmt_macro:__pkg__",
"//score/mw/log/rust/score_log:__pkg__",
"//score/mw/log/rust/score_log_fmt_macro:__pkg__",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ load("@rules_rust//rust:defs.bzl", "rust_proc_macro", "rust_test")
rust_proc_macro(
name = "score_log_fmt_macro",
srcs = glob(["*.rs"]),
visibility = ["//score/log_rust/score_log:__pkg__"],
visibility = ["//score/mw/log/rust/score_log:__pkg__"],
deps = [
"//score/log_rust/score_log_fmt",
"//score/mw/log/rust/score_log_fmt",
"@score_crates//:proc_macro2",
"@score_crates//:quote",
"@score_crates//:syn",
Expand All @@ -28,14 +28,14 @@ rust_test(
name = "tests",
srcs = glob(["tests/**/*.rs"]),
proc_macro_deps = [
"//score/log_rust/score_log_fmt_macro",
"//score/mw/log/rust/score_log_fmt_macro",
],
tags = [
"unit_tests",
"ut",
],
deps = [
"//score/log_rust/score_log",
"//score/log_rust/score_log_fmt",
"//score/mw/log/rust/score_log",
"//score/mw/log/rust/score_log_fmt",
],
)
Loading
Loading