Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly breakage of doctests in workspaces #69

Merged
merged 2 commits into from
Dec 10, 2020
Merged

Conversation

phil-opp
Copy link
Member

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

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
Member Author

Published as v0.10.2.

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