From 13e0f47909db96482b00d3f0ddba3ff31fb01aad Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Thu, 17 Sep 2026 11:00:21 +0000 Subject: [PATCH 1/4] docs: enable score_time documentation bundle - known_good.json: drop "docs": false for score_time and bump its hash to 866479f (upstream moved score_tooling dev targets out of the root BUILD, fixing a dev_dependency visibility error when the module is loaded as a docs_bundle from a non-root workspace). - scripts/known_good/update_module_from_known_good.py: wire up the previously unused generate_docs_bundles_content() so docs_bundles.bzl is actually regenerated by the script, as already documented/tested. - patches/time/001-fix-docs-mount-cross-references.patch: fix two Sphinx issues in score_time's docs that only surface once mounted into the combined reference_integration site: a duplicate "user_manual" label colliding with score_lifecycle's, and absolute :doc: cross-references that break outside score_time's own site root. - Regenerated bazel_common/score_modules_target_sw.MODULE.bazel and bazel_common/docs_bundles.bzl from known_good.json. Verified with: bazel run --lockfile_mode=error //:docs_shim -- \ --github_user=eclipse-score --github_repo=reference_integration which now reports "build succeeded." --- bazel_common/docs_bundles.bzl | 4 ++ .../score_modules_target_sw.MODULE.bazel | 6 ++- known_good.json | 7 ++-- .../001-fix-docs-mount-cross-references.patch | 42 +++++++++++++++++++ patches/time/BUILD | 0 .../update_module_from_known_good.py | 17 ++++++++ 6 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 patches/time/001-fix-docs-mount-cross-references.patch create mode 100644 patches/time/BUILD diff --git a/bazel_common/docs_bundles.bzl b/bazel_common/docs_bundles.bzl index 3f41d506650..cdf7d1100ff 100644 --- a/bazel_common/docs_bundles.bzl +++ b/bazel_common/docs_bundles.bzl @@ -36,6 +36,10 @@ DOCS_BUNDLES = [ "bundle": "@score_logging//:docs_bundle", "mount_at": "modules/score_logging", }, + { + "bundle": "@score_time//:docs_bundle", + "mount_at": "modules/score_time", + }, { "bundle": "@score_itf//:docs_bundle", "mount_at": "process_methods_tools/score_itf", diff --git a/bazel_common/score_modules_target_sw.MODULE.bazel b/bazel_common/score_modules_target_sw.MODULE.bazel index 52ba2aa699a..2429aae2d06 100644 --- a/bazel_common/score_modules_target_sw.MODULE.bazel +++ b/bazel_common/score_modules_target_sw.MODULE.bazel @@ -85,7 +85,11 @@ git_override( bazel_dep(name = "score_time") git_override( module_name = "score_time", - commit = "310c9b63bc21fdc85df840fb8ee400a610667038", + commit = "866479f654292155fbfef488fa02c089f3e5d8e1", + patch_strip = 1, + patches = [ + "//patches/time:001-fix-docs-mount-cross-references.patch", + ], remote = "https://github.com/eclipse-score/time.git", ) diff --git a/known_good.json b/known_good.json index 8024415c01a..856fd36d6a8 100644 --- a/known_good.json +++ b/known_good.json @@ -136,9 +136,10 @@ }, "score_time": { "repo": "https://github.com/eclipse-score/time.git", - "docs": false, - "hash": "310c9b63bc21fdc85df840fb8ee400a610667038", - "bazel_patches": [], + "hash": "866479f654292155fbfef488fa02c089f3e5d8e1", + "bazel_patches": [ + "//patches/time:001-fix-docs-mount-cross-references.patch" + ], "metadata": { "code_root_path": "//score/...", "extra_test_config": [], diff --git a/patches/time/001-fix-docs-mount-cross-references.patch b/patches/time/001-fix-docs-mount-cross-references.patch new file mode 100644 index 00000000000..a5978d3e904 --- /dev/null +++ b/patches/time/001-fix-docs-mount-cross-references.patch @@ -0,0 +1,42 @@ +diff --git a/docs/module/manuals/user_manual.rst b/docs/module/manuals/user_manual.rst +--- a/docs/module/manuals/user_manual.rst ++++ b/docs/module/manuals/user_manual.rst +@@ -12,8 +12,8 @@ + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* + +-.. _user_manual: ++.. _user_manual_time: + + User Manual + ########### + +@@ -92,6 +92,6 @@ + For detailed component-specific user manuals, see: + +-* :doc:`/time_slave/manuals/user_manual` +-* :doc:`/time_daemon/manuals/user_manual` ++* :doc:`../../time_slave/manuals/user_manual` ++* :doc:`../../time_daemon/manuals/user_manual` + + Examples +@@ -200,6 +200,6 @@ + For service deployment and configuration details, refer to: + +-* :doc:`/time_slave/manuals/user_manual` +-* :doc:`/time_daemon/manuals/user_manual` ++* :doc:`../../time_slave/manuals/user_manual` ++* :doc:`../../time_daemon/manuals/user_manual` + + System Services Deployment +diff --git a/docs/module/manuals/api_description/api_usage.rst b/docs/module/manuals/api_description/api_usage.rst +--- a/docs/module/manuals/api_description/api_usage.rst ++++ b/docs/module/manuals/api_description/api_usage.rst +@@ -28,6 +28,6 @@ + * ``score::time::HighResSteadyTime`` via ``score::time::HighResSteadyClock`` + * ``score::time::VehicleTime`` via ``score::time::VehicleClock`` + +-For more detail, see the :ref:`module user manual`. ++For more detail, see the :ref:`module user manual`. + + Polling Local Time Bases diff --git a/patches/time/BUILD b/patches/time/BUILD new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/known_good/update_module_from_known_good.py b/scripts/known_good/update_module_from_known_good.py index 39ab1218f25..8f8b22241ac 100755 --- a/scripts/known_good/update_module_from_known_good.py +++ b/scripts/known_good/update_module_from_known_good.py @@ -476,6 +476,23 @@ def main() -> None: generated_files.append(output_path_coverage) print(f"Generated {output_path_coverage}") + # Generate docs_bundles.bzl once, covering every group's documentation mounts. + content_docs_bundles = generate_docs_bundles_content(known_good, known_good.timestamp) + output_dir_docs_bundles = os.path.abspath(args.output_dir_docs_bundles) + output_path_docs_bundles = os.path.join(output_dir_docs_bundles, "docs_bundles.bzl") + + if args.dry_run: + print(f"\nDry run: would write to {output_path_docs_bundles}\n") + print("---- BEGIN GENERATED CONTENT FOR DOCS BUNDLES ----") + print(content_docs_bundles) + print("---- END GENERATED CONTENT FOR DOCS BUNDLES ----") + else: + os.makedirs(output_dir_docs_bundles, exist_ok=True) + with open(output_path_docs_bundles, "w", encoding="utf-8") as f: + f.write(content_docs_bundles) + generated_files.append(output_path_docs_bundles) + print(f"Generated {output_path_docs_bundles}") + if not args.dry_run and generated_files: print(f"\nSuccessfully generated {len(generated_files)} file(s) with {total_module_count} total modules") From ec1bcf03c78ed0fb4f9584cec3b9b4a058837465 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Thu, 17 Sep 2026 15:26:04 +0000 Subject: [PATCH 2/4] fix(time): un-dev score_time's reference_integration test deps score_time's newest commit (866479f) added score/time_slave/tests/reference_integration/, a test tree built specifically for consumption by reference_integration's generic per-module unit-test sweep (@score_time//score/...). Its BUILD files load() several Bazel repos that score_time only declares as dev_dependency = True in its own MODULE.bazel, so once score_time is a non-root module (our case) those repos are invisible and package loading crashes before any target selection happens - identical failure mode to the score_tooling issue fixed upstream for the root BUILD. - patches/time/002-non-dev-reference-integration-test-deps.patch: drop dev_dependency = True from score_itf, rules_pkg, score_rules_imagefs and nlohmann_json bazel_deps (plus the standalone dev_dependency flag on the json_schema_validator http_archive, which needs nlohmann_json to load its own BUILD file). The imagefs/oci module extensions themselves stay dev_dependency - we only need the repos visible for load(), not their toolchain machinery. - patches/time/003-disable-broken-qnx-ifs-target.patch: the qnx_ifs target in score/time_slave/tests/reference_integration/qnx/BUILD still fails even once its repo is visible - its declared score_rules_imagefs 0.0.3 doesn't have the extra_build_files attribute the target uses. Since it's a QNX image-filesystem build we don't need for reference_integration's tests, remove the target (and its now-unused load) rather than chase a version bump. - known_good.json: register both new patches for score_time. - Regenerated bazel_common/score_modules_target_sw.MODULE.bazel. Verified by overlaying the three patches (applied via GNU patch, matching Bazel's ctx.patch()) onto a pristine shallow clone of score_time@866479f, then swapping that into the fetched @score_time+ external repo and re-running `bazel query/build "@score_time//score/..."` - no more package-loading or analysis errors. --- .../score_modules_target_sw.MODULE.bazel | 2 ++ known_good.json | 4 ++- ...-dev-reference-integration-test-deps.patch | 35 +++++++++++++++++++ .../003-disable-broken-qnx-ifs-target.patch | 24 +++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 patches/time/002-non-dev-reference-integration-test-deps.patch create mode 100644 patches/time/003-disable-broken-qnx-ifs-target.patch diff --git a/bazel_common/score_modules_target_sw.MODULE.bazel b/bazel_common/score_modules_target_sw.MODULE.bazel index 2429aae2d06..e8ceb471840 100644 --- a/bazel_common/score_modules_target_sw.MODULE.bazel +++ b/bazel_common/score_modules_target_sw.MODULE.bazel @@ -89,6 +89,8 @@ git_override( patch_strip = 1, patches = [ "//patches/time:001-fix-docs-mount-cross-references.patch", + "//patches/time:002-non-dev-reference-integration-test-deps.patch", + "//patches/time:003-disable-broken-qnx-ifs-target.patch", ], remote = "https://github.com/eclipse-score/time.git", ) diff --git a/known_good.json b/known_good.json index 856fd36d6a8..5a00ffcf104 100644 --- a/known_good.json +++ b/known_good.json @@ -138,7 +138,9 @@ "repo": "https://github.com/eclipse-score/time.git", "hash": "866479f654292155fbfef488fa02c089f3e5d8e1", "bazel_patches": [ - "//patches/time:001-fix-docs-mount-cross-references.patch" + "//patches/time:001-fix-docs-mount-cross-references.patch", + "//patches/time:002-non-dev-reference-integration-test-deps.patch", + "//patches/time:003-disable-broken-qnx-ifs-target.patch" ], "metadata": { "code_root_path": "//score/...", diff --git a/patches/time/002-non-dev-reference-integration-test-deps.patch b/patches/time/002-non-dev-reference-integration-test-deps.patch new file mode 100644 index 00000000000..ccadb816a25 --- /dev/null +++ b/patches/time/002-non-dev-reference-integration-test-deps.patch @@ -0,0 +1,35 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -219,8 +219,8 @@ + ## Integration Test Framework dependencies + +-bazel_dep(name = "score_itf", version = "0.5.0", dev_dependency = True) ++bazel_dep(name = "score_itf", version = "0.5.0") + bazel_dep(name = "bazel_skylib", version = "1.9.0", dev_dependency = True) +-bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True) ++bazel_dep(name = "rules_pkg", version = "1.2.0") + bazel_dep(name = "rules_oci", version = "2.2.7", dev_dependency = True) + + oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True) +@@ -234,6 +234,6 @@ + use_repo(oci, "ubuntu_24_04", "ubuntu_24_04_linux_amd64") + +-bazel_dep(name = "score_rules_imagefs", version = "0.0.3", dev_dependency = True) ++bazel_dep(name = "score_rules_imagefs", version = "0.0.3") + + imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True) + imagefs.toolchain( +@@ -253,11 +253,10 @@ + ## JSON Schema validation (build-time lint) + +-bazel_dep(name = "nlohmann_json", version = "3.11.3", dev_dependency = True) ++bazel_dep(name = "nlohmann_json", version = "3.11.3") + + http_archive( + name = "json_schema_validator", + build_file = "//third_party/json_schema_validator:json_schema_validator.BUILD", +- dev_dependency = True, + integrity = "sha256-g/YdgRL0heDT8ectUWELo5JLF5kmqDdq7zwDh3D68gI=", + strip_prefix = "json-schema-validator-2.1.0", + urls = ["https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.1.0.tar.gz"], diff --git a/patches/time/003-disable-broken-qnx-ifs-target.patch b/patches/time/003-disable-broken-qnx-ifs-target.patch new file mode 100644 index 00000000000..6658f3ea99f --- /dev/null +++ b/patches/time/003-disable-broken-qnx-ifs-target.patch @@ -0,0 +1,24 @@ +diff --git a/score/time_slave/tests/reference_integration/qnx/BUILD b/score/time_slave/tests/reference_integration/qnx/BUILD +--- a/score/time_slave/tests/reference_integration/qnx/BUILD ++++ b/score/time_slave/tests/reference_integration/qnx/BUILD +@@ -13,5 +13,4 @@ + + load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") +-load("@score_rules_imagefs//rules/qnx:ifs.bzl", "qnx_ifs") + + pkg_files( +@@ -32,14 +31,1 @@ + ) +- +-qnx_ifs( +- name = "ifs", +- srcs = [ +- ":time_slave_bin", +- ":time_slave_etc", +- ], +- build_file = "init.build", +- extra_build_files = ["tools.build"], +- tags = ["manual"], +- target_compatible_with = ["@platforms//os:qnx"], +- visibility = ["//visibility:public"], +-) From b8ff1b8d843c85048b5de91d4489348e94bca6d9 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Mon, 21 Sep 2026 09:28:05 +0000 Subject: [PATCH 3/4] Update score_time to latest known-good hash Bump score_time from 866479f654292155fbfef488fa02c089f3e5d8e1 to 9b307d896c77cf85d8ad7097da04a3ef041df005 (main). Remove two now-obsolete patches, both superseded by upstream PRs opened during PR #348 review: - 001-fix-docs-mount-cross-references.patch: merged upstream via eclipse-score/time#224 (verified via patch --dry-run: "Reversed (or previously applied) patch detected"). - 002-non-dev-reference-integration-test-deps.patch: merged upstream via eclipse-score/time#225. dry-run reports hunk failures (not "reversed") because upstream reformatted surrounding blank lines, but manual inspection of MODULE.bazel at the new hash confirms every dev_dependency = True removal from the patch is already present. 003-disable-broken-qnx-ifs-target.patch is kept: it fixes an independent version conflict between reference_integration's own pinned score_rules_imagefs 0.0.1 override and score_time's test target, unrelated to #224/#225, and still applies cleanly. Verified with 'bazel query @score_time//score/...' (the actual code_root_path subtree) and 'bazel build @score_time//score/ts_client:docs_bundle'. Regenerated bazel_common/score_modules_target_sw.MODULE.bazel via scripts/known_good/update_module_from_known_good.py. MODULE.bazel.lock needs no update: git_override entries are read directly from MODULE.bazel and are not part of the registry-resolved lockfile content. --- .../score_modules_target_sw.MODULE.bazel | 4 +- known_good.json | 4 +- .../001-fix-docs-mount-cross-references.patch | 42 ------------------- ...-dev-reference-integration-test-deps.patch | 35 ---------------- 4 files changed, 2 insertions(+), 83 deletions(-) delete mode 100644 patches/time/001-fix-docs-mount-cross-references.patch delete mode 100644 patches/time/002-non-dev-reference-integration-test-deps.patch diff --git a/bazel_common/score_modules_target_sw.MODULE.bazel b/bazel_common/score_modules_target_sw.MODULE.bazel index e8ceb471840..291d09d7c6c 100644 --- a/bazel_common/score_modules_target_sw.MODULE.bazel +++ b/bazel_common/score_modules_target_sw.MODULE.bazel @@ -85,11 +85,9 @@ git_override( bazel_dep(name = "score_time") git_override( module_name = "score_time", - commit = "866479f654292155fbfef488fa02c089f3e5d8e1", + commit = "9b307d896c77cf85d8ad7097da04a3ef041df005", patch_strip = 1, patches = [ - "//patches/time:001-fix-docs-mount-cross-references.patch", - "//patches/time:002-non-dev-reference-integration-test-deps.patch", "//patches/time:003-disable-broken-qnx-ifs-target.patch", ], remote = "https://github.com/eclipse-score/time.git", diff --git a/known_good.json b/known_good.json index 5a00ffcf104..ba82dbe6701 100644 --- a/known_good.json +++ b/known_good.json @@ -136,10 +136,8 @@ }, "score_time": { "repo": "https://github.com/eclipse-score/time.git", - "hash": "866479f654292155fbfef488fa02c089f3e5d8e1", + "hash": "9b307d896c77cf85d8ad7097da04a3ef041df005", "bazel_patches": [ - "//patches/time:001-fix-docs-mount-cross-references.patch", - "//patches/time:002-non-dev-reference-integration-test-deps.patch", "//patches/time:003-disable-broken-qnx-ifs-target.patch" ], "metadata": { diff --git a/patches/time/001-fix-docs-mount-cross-references.patch b/patches/time/001-fix-docs-mount-cross-references.patch deleted file mode 100644 index a5978d3e904..00000000000 --- a/patches/time/001-fix-docs-mount-cross-references.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/docs/module/manuals/user_manual.rst b/docs/module/manuals/user_manual.rst ---- a/docs/module/manuals/user_manual.rst -+++ b/docs/module/manuals/user_manual.rst -@@ -12,8 +12,8 @@ - # SPDX-License-Identifier: Apache-2.0 - # ******************************************************************************* - --.. _user_manual: -+.. _user_manual_time: - - User Manual - ########### - -@@ -92,6 +92,6 @@ - For detailed component-specific user manuals, see: - --* :doc:`/time_slave/manuals/user_manual` --* :doc:`/time_daemon/manuals/user_manual` -+* :doc:`../../time_slave/manuals/user_manual` -+* :doc:`../../time_daemon/manuals/user_manual` - - Examples -@@ -200,6 +200,6 @@ - For service deployment and configuration details, refer to: - --* :doc:`/time_slave/manuals/user_manual` --* :doc:`/time_daemon/manuals/user_manual` -+* :doc:`../../time_slave/manuals/user_manual` -+* :doc:`../../time_daemon/manuals/user_manual` - - System Services Deployment -diff --git a/docs/module/manuals/api_description/api_usage.rst b/docs/module/manuals/api_description/api_usage.rst ---- a/docs/module/manuals/api_description/api_usage.rst -+++ b/docs/module/manuals/api_description/api_usage.rst -@@ -28,6 +28,6 @@ - * ``score::time::HighResSteadyTime`` via ``score::time::HighResSteadyClock`` - * ``score::time::VehicleTime`` via ``score::time::VehicleClock`` - --For more detail, see the :ref:`module user manual`. -+For more detail, see the :ref:`module user manual`. - - Polling Local Time Bases diff --git a/patches/time/002-non-dev-reference-integration-test-deps.patch b/patches/time/002-non-dev-reference-integration-test-deps.patch deleted file mode 100644 index ccadb816a25..00000000000 --- a/patches/time/002-non-dev-reference-integration-test-deps.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/MODULE.bazel b/MODULE.bazel ---- a/MODULE.bazel -+++ b/MODULE.bazel -@@ -219,8 +219,8 @@ - ## Integration Test Framework dependencies - --bazel_dep(name = "score_itf", version = "0.5.0", dev_dependency = True) -+bazel_dep(name = "score_itf", version = "0.5.0") - bazel_dep(name = "bazel_skylib", version = "1.9.0", dev_dependency = True) --bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True) -+bazel_dep(name = "rules_pkg", version = "1.2.0") - bazel_dep(name = "rules_oci", version = "2.2.7", dev_dependency = True) - - oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True) -@@ -234,6 +234,6 @@ - use_repo(oci, "ubuntu_24_04", "ubuntu_24_04_linux_amd64") - --bazel_dep(name = "score_rules_imagefs", version = "0.0.3", dev_dependency = True) -+bazel_dep(name = "score_rules_imagefs", version = "0.0.3") - - imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True) - imagefs.toolchain( -@@ -253,11 +253,10 @@ - ## JSON Schema validation (build-time lint) - --bazel_dep(name = "nlohmann_json", version = "3.11.3", dev_dependency = True) -+bazel_dep(name = "nlohmann_json", version = "3.11.3") - - http_archive( - name = "json_schema_validator", - build_file = "//third_party/json_schema_validator:json_schema_validator.BUILD", -- dev_dependency = True, - integrity = "sha256-g/YdgRL0heDT8ectUWELo5JLF5kmqDdq7zwDh3D68gI=", - strip_prefix = "json-schema-validator-2.1.0", - urls = ["https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.1.0.tar.gz"], From b4bc1eae635ebf313bbe29b1788000b77e089be8 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Mon, 21 Sep 2026 11:08:48 +0000 Subject: [PATCH 4/4] Update score_time to latest known-good hash Bump score_time from 9b307d896c77cf85d8ad7097da04a3ef041df005 to 3723ce687e4abc7d6cb4c0efdbbd30455ed7c303 (main), which merges eclipse-score/time#229: fixes the absolute :doc: mount cross-reference in score/time/docs/detailed_design/index.rst that broke reference_integration's combined docs build (WARNING: unknown document: '/module/manuals/user_manual', treated as error with -W). Regenerated bazel_common/score_modules_target_sw.MODULE.bazel via scripts/known_good/update_module_from_known_good.py. MODULE.bazel.lock verified unchanged: 'bazel build --lockfile_mode=error @score_time//:docs_bundle' before and after this bump produces an identical MODULE.bazel.lock (same checksum) and completes successfully - git_override entries are read directly from MODULE.bazel and are not part of the registry-resolved lockfile content. --- bazel_common/score_modules_target_sw.MODULE.bazel | 2 +- known_good.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_common/score_modules_target_sw.MODULE.bazel b/bazel_common/score_modules_target_sw.MODULE.bazel index 291d09d7c6c..96c595bd41f 100644 --- a/bazel_common/score_modules_target_sw.MODULE.bazel +++ b/bazel_common/score_modules_target_sw.MODULE.bazel @@ -85,7 +85,7 @@ git_override( bazel_dep(name = "score_time") git_override( module_name = "score_time", - commit = "9b307d896c77cf85d8ad7097da04a3ef041df005", + commit = "3723ce687e4abc7d6cb4c0efdbbd30455ed7c303", patch_strip = 1, patches = [ "//patches/time:003-disable-broken-qnx-ifs-target.patch", diff --git a/known_good.json b/known_good.json index ba82dbe6701..5e93c31024a 100644 --- a/known_good.json +++ b/known_good.json @@ -136,7 +136,7 @@ }, "score_time": { "repo": "https://github.com/eclipse-score/time.git", - "hash": "9b307d896c77cf85d8ad7097da04a3ef041df005", + "hash": "3723ce687e4abc7d6cb4c0efdbbd30455ed7c303", "bazel_patches": [ "//patches/time:003-disable-broken-qnx-ifs-target.patch" ],