Skip to content

Commit 701e208

Browse files
authored
update modules for 0.5.0 release (#21)
com now builds only @com//score/mw/com:com
1 parent 9961879 commit 701e208

File tree

8 files changed

+215
-243
lines changed

8 files changed

+215
-243
lines changed

β€Ž.bazelrcβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry
1515
common --registry=https://bcr.bazel.build
1616

1717

18-
# Flags needed by score-baselibs and communication modules.
18+
# Flags needed by score_baselibs and communication modules.
1919
# Do not add more!
20-
build --@score-baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
21-
build --@score-baselibs//score/mw/log/flags:KRemote_Logging=False
22-
build --@score-baselibs//score/json:base_library=nlohmann
23-
build --@communication//score/mw/com/flags:tracing_library=stub
20+
build --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
21+
build --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
22+
build --@score_baselibs//score/json:base_library=nlohmann
23+
build --@score_communication//score/mw/com/flags:tracing_library=stub
2424

2525
# stop legacy behavior of creating __init__.py files
2626
build --incompatible_default_to_explicit_init_py

β€Ž.github/workflows/test_integration.ymlβ€Ž

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,28 @@ name: Bazel Build some repositories
1818
on:
1919
workflow_dispatch:
2020
push:
21+
pull_request:
2122
jobs:
2223
integration_test:
2324
runs-on: ubuntu-latest
2425
steps:
26+
- name: Show disk space before build
27+
run: |
28+
echo 'Disk space before build:'
29+
df -h
30+
- name: Removing unneeded software
31+
run: |
32+
echo "Removing unneeded software... "
33+
if [ -d /usr/share/dotnet ]; then echo "Removing dotnet..."; start=$(date +%s); sudo rm -rf /usr/share/dotnet; end=$(date +%s); echo "Duration: $((end-start))s"; fi
34+
#if [ -d /usr/local/lib/android ]; then echo "Removing android..."; start=$(date +%s); sudo rm -rf /usr/local/lib/android; end=$(date +%s); echo "Duration: $((end-start))s"; fi
35+
if [ -d /opt/ghc ]; then echo "Removing haskell (ghc)..."; start=$(date +%s); sudo rm -rf /opt/ghc; end=$(date +%s); echo "Duration: $((end-start))s"; fi
36+
if [ -d /usr/local/.ghcup ]; then echo "Removing haskell (ghcup)..."; start=$(date +%s); sudo rm -rf /usr/local/.ghcup; end=$(date +%s); echo "Duration: $((end-start))s"; fi
37+
if [ -d /usr/share/swift ]; then echo "Removing swift..."; start=$(date +%s); sudo rm -rf /usr/share/swift; end=$(date +%s); echo "Duration: $((end-start))s"; fi
38+
if [ -d /usr/local/share/chromium ]; then echo "Removing chromium..."; start=$(date +%s); sudo rm -rf /usr/local/share/chromium; end=$(date +%s); echo "Duration: $((end-start))s"; fi
39+
- name: Show disk space after cleanup
40+
run: |
41+
echo 'Disk space after cleanup:'
42+
df -h
2543
- name: Checkout repository
2644
uses: actions/[email protected]
2745
- name: Setup Bazel
@@ -33,28 +51,14 @@ jobs:
3351
disk-cache: ${{ github.workflow }}
3452
# Share repository cache between workflows.
3553
repository-cache: true
36-
- name: Show disk space before build
37-
run: |
38-
echo 'Disk space before build:'
39-
df -h
40-
echo 'Inode usage before build:'
41-
df -i
42-
echo 'Largest top-level directories:'
43-
du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true
4454
- name: Bazel build targets
4555
run: |
46-
echo 'Starting Bazel build (disk space snapshot):'
47-
df -h | sed 's/^/PRE-BUILD DF /'
4856
./integration_test.sh
4957
- name: Show disk space after build
5058
if: always()
5159
run: |
5260
echo 'Disk space after build:'
5361
df -h
54-
echo 'Inode usage after build:'
55-
df -i
56-
echo 'Largest top-level directories after build:'
57-
du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true
5862
- name: Publish build summary
5963
if: always()
6064
run: |

β€ŽMODULE.bazelβ€Ž

Lines changed: 18 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,82 +18,40 @@ module(
1818
)
1919

2020
include("//:score_modules.MODULE.bazel")
21+
include("//:score_toolchains.MODULE.bazel")
2122

22-
# for building documentation, verifying traceability etc.
23-
bazel_dep(name = "score_platform", version = "0.3.0")
24-
bazel_dep(name = "score_bazel_platforms", version = "0.0.2")
25-
bazel_dep(name = "score_crates", version = "0.0.3")
2623

27-
# QNX toolchain
28-
bazel_dep(name = "score_toolchains_qnx", version = "0.0.2")
29-
toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx")
30-
toolchains_qnx.sdp(
31-
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
32-
strip_prefix = "installation",
33-
url = "https://www.qnx.com/download/download/79858/installation.tgz",
34-
)
35-
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
36-
use_repo(toolchains_qnx, "toolchains_qnx_qcc")
24+
## Python
25+
bazel_dep(name = "rules_python", version = "1.4.1")
3726

38-
#gcc toolchain for baselibs
39-
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = False)
40-
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = False)
41-
gcc.toolchain(
42-
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
43-
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
44-
strip_prefix = "x86_64-unknown-linux-gnu",
45-
)
46-
gcc.extra_features(
47-
features = [
48-
"minimal_warnings",
49-
"treat_warnings_as_errors",
50-
],
51-
)
52-
gcc.warning_flags(
53-
minimal_warnings = ["-Wall", "-Wno-error=deprecated-declarations", "-Wno-error=narrowing"],
54-
strict_warnings = ["-Wextra", "-Wpedantic"],
55-
treat_warnings_as_errors = ["-Werror"],
56-
)
57-
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
58-
register_toolchains("@gcc_toolchain//:all")
27+
PYTHON_VERSION = "3.12"
5928

60-
bazel_dep(name = "score_test_scenarios", version = "0.3.0")
61-
git_override(
62-
module_name = "score_test_scenarios",
63-
commit = "a2f9cded3deb636f5dc800bf7a47131487119721", # tag v0.3.0
64-
remote = "https://github.com/eclipse-score/testing_tools.git",
29+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
30+
python.toolchain(
31+
configure_coverage_tool = True,
32+
is_default = True,
33+
python_version = PYTHON_VERSION,
6534
)
35+
use_repo(python)
6636

67-
# Needed for feature integration tests
68-
bazel_dep(name = "rules_rust", version = "0.61.0")
69-
bazel_dep(name = "score_itf", version = "0.1.0")
37+
# Special imports for certain modules
7038

71-
# # TODO: What is this for?
39+
# communication module dependencies
40+
# archive_override are not forwarded by bazel_dep, so we need to redefine it here
7241
archive_override(
7342
module_name = "rules_boost",
7443
strip_prefix = "rules_boost-master",
7544
urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"],
7645
)
7746

78-
# # TODO: we cannot use communication without including TRLC here?
79-
bazel_dep(name = "trlc", version = "0.0.0")
47+
# git_override are not forwarded by bazel_dep, so we need to redefine it here
8048
git_override(
8149
module_name = "trlc",
8250
remote = "https://github.com/bmw-software-engineering/trlc.git",
8351
commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release
8452
)
8553

86-
# System/Basics
87-
88-
## Python
89-
bazel_dep(name = "rules_python", version = "1.4.1")
90-
91-
PYTHON_VERSION = "3.12"
92-
93-
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
94-
python.toolchain(
95-
configure_coverage_tool = True,
96-
is_default = True,
97-
python_version = PYTHON_VERSION,
98-
)
99-
use_repo(python)
54+
# imports for the feature showcase module
55+
bazel_dep(name = "rules_rust", version = "0.61.0")
56+
bazel_dep(name = "score_itf", version = "0.1.0")
57+
bazel_dep(name = "score_crates", version = "0.0.3")

β€ŽREADME.mdβ€Ž

Lines changed: 73 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
1-
# Reference Integration
1+
# Score Reference Integration
22

3-
Integration workspace for the Eclipse Score project. This repository is used to validate cross-module builds (e.g. baselibs, communication, persistency, feo, etc.) from a single Bazel workspace.
3+
This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, feo, etc.) to validate cross-repository builds and detect integration issues early in the development cycle.
44

5-
## βœ… Working Build Commands
5+
## Overview
66

7-
### Baselibs
7+
The reference integration workspace serves as a single Bazel build environment to:
8+
- Validate cross-module dependency graphs
9+
- Detect label and repository boundary issues
10+
- Test toolchain and platform support (Linux, QNX, LLVM/GCC)
11+
- Prepare for release validation workflows
12+
13+
## Working Builds βœ…
814

15+
The following modules build successfully with the `bl-x86_64-linux` configuration:
16+
17+
### Baselibs
918
```bash
10-
bazel build --config bl-x86_64-linux @score-baselibs//score/... --verbose_failures
19+
bazel build --config bl-x86_64-linux @score_baselibs//score/... --verbose_failures
1120
```
1221

1322
### Communication
14-
1523
```bash
16-
bazel build --config bl-x86_64-linux @communication//score/... @communication//third_party/... --verbose_failures
24+
bazel build --config bl-x86_64-linux @score_communication//score/mw/com:com --verbose_failures
1725
```
1826

1927
### Persistency
20-
2128
```bash
22-
bazel build \
23-
@score_persistency//src/... \
24-
@score_persistency//tests/cpp_test_scenarios/... \
25-
@score_persistency//tests/rust_test_scenarios/... \
26-
--extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux \
27-
--copt=-Wno-deprecated-declarations \
28-
--verbose_failures
29+
bazel build --config bl-x86_64-linux \
30+
@score_persistency//src/cpp/src/... \
31+
@score_persistency//src/rust/... \
32+
--verbose_failures
2933
```
3034

3135
> Note: Python tests for `@score_persistency` cannot be built from this integration workspace due to Bazel external repository visibility limitations. The pip extension and Python dependencies must be accessed within their defining module.
3236
3337
### Orchestration and `kyron` - async runtime for Rust
3438

3539
```bash
36-
bazel build @score_orchestrator//src/...
40+
bazel build --config bl-x86_64-linux @score_orchestrator//src/...
3741
```
3842

3943
## Feature showcase examples
@@ -42,61 +46,81 @@ You can run them currently for host platform using `--config bl-x86_64-linux`.
4246

4347
Execute `bazel query //feature_showcase/...` to obtain list of targets that You can run.
4448

45-
## ⚠️ Observed Issues
4649

47-
### communication: score/mw/com/requirements
48-
Problems when building from a different repo:
49-
- Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label mismatch).
50-
- `runtime_test.cpp:get_path` is checking `safe_posix_platform` (likely an outdated module name) instead of `external/communication+/`.
51-
- fixed in feature/build_from_reference_repo https://github.com/etas-contrib/score_communication.git
50+
```bash
51+
bazel build --config bl-x86_64-linux @score_orchestrator//src/... --verbose_failures
52+
```
5253

53-
### communication: get_git_info
54-
@communication//third_party/... here get_git_info is causing problems because it cannot find github root from e.g.
55-
/home/runner/.bazel/sandbox/processwrapper-sandbox/1689/execroot/_main/bazel-out/k8-opt-exec-ST-8abfa5a323e1/bin/external/communication+/third_party/traceability/tools/source_code_linker/parsed_source_files_for_source_code_linker.runfiles/communication+/third_party/traceability/tools/source_code_linker/get_git_info.py
56-
is this needed? should we fix it?
54+
## Known Issues ⚠️
5755

58-
### Toolchain / Version Drift
59-
- Persistency uses `llvm_toolchain 1.2.0` while baselibs uses `1.4.0`. Aligning versions may reduce incompatibilities. Also Persistency does not work with `1.4.0`.
56+
### Orchestrator
57+
**Issue:** Direct toolchain loading at `BUILD:14`
58+
```
59+
load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs")
60+
```
61+
**Resolution needed:** Refactor to use proper toolchain resolution instead of direct load statements.
6062

61-
## 🚧 Not Yet Working
63+
**Issue:** clang needs to be installed
64+
```
65+
sudo apt install clang
66+
```
67+
**Resolution needed:** why is this happening with -extra_toolchains=@gcc_toolchain//:host_gcc_12 ?
6268

63-
```bash
64-
bazel build @score_persistency//src/cpp/... --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
69+
### Communication
70+
**Module:** `score/mw/com/requirements`
6571

72+
**Issues when building from external repository:**
73+
1. **Label inconsistency:** Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label). Should standardize on local labels within the module.
74+
2. **Outdated path reference:** `runtime_test.cpp:get_path` checks for `safe_posix_platform` (likely obsolete module name) instead of `external/score_communication+/`.
75+
76+
### Persistency
77+
**Test failures in `src/cpp/tests`:**
78+
1. **Dependency misconfiguration:** `google_benchmark` should not be a dev-only dependency if required by tests. Consider separating benchmark targets.
79+
2. **Compiler-specific issue in `test_kvs.cpp`:** Contains GCC-specific self-move handling that is incorrect and fails with GCC (only builds with LLVM). Needs portable fix or removal of undefined behavior.
80+
81+
## Build Blockers 🚧
82+
83+
The following builds are currently failing:
84+
85+
### FEO (Full Build)
86+
```bash
6687
bazel build @feo//... --verbose_failures
6788
```
6889

69-
90+
### Persistency (Full Build)
7091
```bash
71-
bazel mod graph
92+
bazel build --config bl-x86_64-linux @score_persistency//src/... --verbose_failures
7293
```
73-
It is working with latest baselibs (dev_dependency = True for score_toolchains_qnx), but communication is not building with it.
7494

75-
### Missing System Packages (for feo build)
76-
Install required system dependencies:
95+
## System Dependencies
96+
97+
### Required Packages for FEO
98+
Install the following system packages before building FEO:
7799
```bash
78100
sudo apt-get update
79101
sudo apt-get install -y protobuf-compiler libclang-dev
80102
```
81103

82-
## πŸ§ͺ To Be Done
104+
## Pending Tasks πŸ§ͺ
83105

84-
```bash
85-
bazel test @itf//...
86-
```
106+
- [ ] Add test targets once cross-repository visibility constraints are clarified
107+
- [ ] Normalize third-party label usage across all `BUILD` files
108+
- [ ] Resolve FEO build failures
109+
- [ ] Fix Persistency full build
110+
- [ ] Address compiler-specific issues in test suites
87111

88-
Add test targets once cross-repo visibility constraints are clarified.
112+
## Proxy & External Dependencies 🌐
89113

90-
Configuration handling (instead of baselibs.bazelrc,...)
114+
### Current Issue
91115

92-
## 🌐 Proxy & Dependency Handling
116+
The `starpls.bzl` file ([source](https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl)) uses `curl` directly for downloading dependencies, which:
117+
- Bypasses Bazel's managed fetch lifecycle and dependency tracking
118+
- Breaks reproducibility and remote caching expectations
119+
- May fail in corporate proxy-restricted environments
93120

94-
`starpls.bzl` (see: https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl) uses `curl` directly, which:
95-
- Bypasses Bazel's fetch/dependency tracking.
96-
- May fail in a proxy-restricted environment.
121+
### Workaround
97122

98-
### Possible Workaround
99-
Use a `local_path_override` and set proxy environment variables before invoking the rule:
123+
Use a `local_path_override` and configure proxy environment variables before building:
100124

101125
```bash
102126
export http_proxy=http://127.0.0.1:3128
@@ -105,7 +129,7 @@ export HTTP_PROXY=http://127.0.0.1:3128
105129
export HTTPS_PROXY=http://127.0.0.1:3128
106130
```
107131

108-
Example Bazel module override snippet:
132+
Add this to your `MODULE.bazel`:
109133
```python
110134
local_path_override(module_name = "score_tooling", path = "../tooling")
111135
```
@@ -114,27 +138,11 @@ local_path_override(module_name = "score_tooling", path = "../tooling")
114138
- Replace raw `curl` calls with Bazel `http_archive` or `repository_ctx.download` for reproducibility.
115139
- Parameterize proxy usage via environment or Bazel config flags.
116140

117-
## πŸ” Next Investigation Targets
118-
- Normalize third-party label usage (`@//third_party` vs `//third_party`).
119-
- Update `runtime_test.cpp:get_path` logic for new module layout.
120-
- Unify LLVM toolchain versions across modules.
121-
- Introduce integration tests for `@itf` once build succeeds.
122-
123141
## IDE support
124142

125143
### Rust
126144

127145
Use `./generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work.
128146

129-
## πŸ“Œ Quick Reference
130-
131-
| Area | Status | Action |
132-
|------|--------|--------|
133-
| baselibs build | βœ… | Keep as baseline |
134-
| communication build | βœ… | Fix label style inconsistencies |
135-
| persistency (Python tests) | 🚫 | Not supported cross-repo |
136-
| feo build | ❌ | Install system deps + inspect failures |
137-
| itf tests | ⏳ | Add after build stabilization |
138-
139147
## πŸ—‚ Notes
140148
Keep this file updated as integration issues are resolved. Prefer converting ad-hoc shell steps into Bazel rules or documented scripts under `tools/` for repeatability.

0 commit comments

Comments
Β (0)