Skip to content

fix: respect Bazel package boundaries in mounted docs - #782

Closed
AlexanderLanin wants to merge 3 commits into
mainfrom
fix/781-bazel-package-mount-boundaries
Closed

fix: respect Bazel package boundaries in mounted docs#782
AlexanderLanin wants to merge 3 commits into
mainfrom
fix/781-bazel-package-mount-boundaries

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Summary

Make runtime Sphinx discovery follow the same direct source ownership that Bazel applies to docs_bundle(source_dir = ...).

The mounts manifest now records an anchored include allowlist for each bundle and a separate primary_source record for the project source tree. score_mounts passes the allowlist to sphinx-mounts for child bundles and excludes unowned RST/Markdown files from the primary Sphinx source tree.

This prevents a parent source directory from recursively exposing documents below nested Bazel packages. Those documents are then supplied exactly once by their declared child bundle.

Regression coverage

The subdirectory_bundle scenario now places the child bundle under the producer's docs/ directory, with its own BUILD file. It verifies producer and consumer needs_json, rendered docs, strict docs checks, and link checks. Resolver coverage verifies the new manifest fields; the existing nested-bundles scenario remains unchanged and passes.

Fixes #781

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 59fabd6b-a5ec-402c-9fc8-ae7807cede34
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 5.656s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@AlexanderLanin
AlexanderLanin marked this pull request as draft August 31, 2026 19:53
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-782: https://eclipse-score.github.io/docs-as-code/pr-782/

@AlexanderLanin

Copy link
Copy Markdown
Member Author

closing in favor of #784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix: respect Bazel package boundaries when mounting docs bundles

1 participant