Skip to content

Map all generated input roots into legacy doctest runfiles - #4271

Merged
UebelAndre merged 1 commit into
bazelbuild:mainfrom
jrandolf:codex/upstream-doctest-generated-input-roots
Sep 28, 2026
Merged

UebelAndre merged 1 commit into
bazelbuild:mainfrom
jrandolf:codex/upstream-doctest-generated-input-roots

Conversation

@jrandolf

@jrandolf jrandolf commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Legacy doctests run from a runfiles directory, but the launcher only strips output roots found through crate and C++ library providers. A generated rustc environment file built in an execution configuration retains a bazel-out/... path and fails before rustdoc starts.

Collect the nonempty roots of every declared action input instead. This also covers generated compiler/linker tools and keeps source paths intact. The new regression executes a doctest using an environment file forwarded through an execution transition; it fails with a missing-file error on main and passes with this change.

Validation on macOS with Bazel 9.2.0: 17 owning tests pass on this standalone branch. This extends the C++ runtime-root handling from #4220. Windows execution was not tested locally.

Closes #4288.

@UebelAndre UebelAndre left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@UebelAndre
UebelAndre added this pull request to the merge queue Sep 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 28, 2026
@UebelAndre
UebelAndre added this pull request to the merge queue Sep 28, 2026
Merged via the queue into bazelbuild:main with commit ffa3ede Sep 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legacy doctests cannot find generated environment files from an execution configuration

2 participants