Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a "standalone" path for doc::Standalone to be able to exclude it
Before this commit, the path for the doc::Standalone step was "src/doc",
which is accurate as the standalone docs source files live at the root
of the "src/doc" directory tree.

Unfortunately, that caused bad interactions when trying to exclude it
with `--exclude src/doc`. When an exclusion is passed to bootstrap, it
will exclude all steps whose path *ends with* the exclusion, which
results in the Cargo book (src/tools/cargo/src/doc) to also be excluded.

To work around this problem, this commit adds the "standalone" path as
an alternate path for doc::Standalone, allowing `--exclude standalone`
to work without side effects.
  • Loading branch information
pietroalbini committed Oct 5, 2022
commit 004b8b98d626a89b5d4cdc630ff337c0f4ea919f
2 changes: 1 addition & 1 deletion src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl Step for Standalone {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path("src/doc").default_condition(builder.config.docs)
run.path("src/doc").path("standalone").default_condition(builder.config.docs)
}

fn make_run(run: RunConfig<'_>) {
Expand Down