Skip to content

Fix nightly breakage of doctests in workspaces - #69

Merged
phil-opp merged 2 commits into
masterfrom
fix-doctests
Dec 10, 2020
Merged

phil-opp merged 2 commits into
masterfrom
fix-doctests

Conversation

@phil-opp

@phil-opp phil-opp commented Dec 10, 2020 •

Copy link
Copy Markdown
Member

In rust-lang/cargo#8954 the working directory for the runner executable changed for doctests. Before, the working directory was the crate dir, now it is the workspace dir. This lead to a bug in bootimage because it now looked for the test-args and other config option in the workpace root Cargo.toml, instead of the crate-specific Cargo.toml.

This commit fixes this by using the CARGO_MANIFEST_DIR environment variable for determining the Cargo.toml path, instead of directly using cargo locate-project as before.

In rust-lang/cargo#8954 the working directory for the runner executable changed for doctests. Before, the working directory was the crate dir, now it is the workspace dir. This lead to a bug in bootimage because it now looked for the `test-args` and other config option in the workpace root `Cargo.toml`, instead of the crate-specific `Cargo.toml`.

This commit fixes this by using the `CARGO_MANIFEST_DIR` environment variable for determining the `Cargo.toml` path, instead of directly using `cargo locate-project` as before.
@phil-opp
phil-opp merged commit 495a2c1 into master Dec 10, 2020
@phil-opp
phil-opp deleted the fix-doctests branch December 10, 2020 15:35
@phil-opp

Copy link
Copy Markdown
Member Author

Published as v0.10.2.

MiscStuff839 pushed a commit to MiscStuff839/bootimage-wasm that referenced this pull request Nov 16, 2025
MiscStuff839 pushed a commit to MiscStuff839/bootimage-wasm that referenced this pull request Nov 16, 2025
Fix nightly breakage of doctests in workspaces
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.

1 participant