Skip to content

refactor: centralize Bazel path handling for docs builds - #834

Draft
AlexanderLanin wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/unify-bazel-path-handling
Draft

AlexanderLanin wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/unify-bazel-path-handling

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Sep 16, 2026

Copy link
Copy Markdown
Member

Why

Make path handling consistent across direct invocation, bazel run, and sandboxed Needs builds. Inputs currently arrive as cwd-relative paths, runfiles keys, or execroot paths; handling those differences at each caller makes the extensions and CLI harder to reason about and brittle for generated or external files. Centralizing execution-mode resolution and making each Bazel path contract explicit reduces duplicated logic while keeping sandbox actions hermetic.

What changed

  • Centralize workspace, package, output, and input path resolution in DocsCliConfig and use it from the CLI and extensions.
  • Pass Bazel-generated file inputs to Needs actions as named environment variables, keeping SPHINX_EXTRA_OPTS for non-path Sphinx overrides.
  • Use runfiles keys for runtime consumers and explicit execroot paths for build actions and genrules.
  • Add regression coverage for the supported path modes and the score_pytest runfiles bootstrap.

The TEMPORARY DIFF NOTE comments in the Starlark files are intentionally included in this draft to make the broad migration easier to review; they can be removed before marking the PR ready.

@github-actions

Copy link
Copy Markdown
Contributor

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

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant