Auto merge of #134907 - Kobzol:rustc-dev-guide-josh, r=ehuss
Turn rustc-dev-guide into a Josh subtree
Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29).
Accompanying rustc-dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2183
I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests.
The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](ad93c5f1c4).
What I did:
```
export DIR=src/doc/rustc-dev-guide
# Remove submodule
git submodule status ${DIR}
git submodule deinit ${DIR}
git rm -r --cached ${DIR}
rm -rf ${DIR}
# Remove rustc-dev-guide from .gitmodules
git commit -m"Removed `${DIR}` submodule"
# Import history with josh
git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD
git merge --allow-unrelated FILTERED_HEAD
# A few follow-up cleanup commits
```
r? ehuss
This commit is contained in:
commit
c528b8c678
250 changed files with 348506 additions and 41 deletions
|
|
@ -63,7 +63,7 @@ macro_rules! book {
|
|||
}
|
||||
|
||||
// NOTE: When adding a book here, make sure to ALSO build the book by
|
||||
// adding a build step in `src/bootstrap/builder.rs`!
|
||||
// adding a build step in `src/bootstrap/code/builder/mod.rs`!
|
||||
// NOTE: Make sure to add the corresponding submodule when adding a new book.
|
||||
// FIXME: Make checking for a submodule automatic somehow (maybe by having a list of all submodules
|
||||
// and checking against it?).
|
||||
|
|
|
|||
|
|
@ -2525,35 +2525,6 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) ->
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct RustcGuide;
|
||||
|
||||
impl Step for RustcGuide {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = false;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/doc/rustc-dev-guide")
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
run.builder.ensure(RustcGuide);
|
||||
}
|
||||
|
||||
fn run(self, builder: &Builder<'_>) {
|
||||
let relative_path = "src/doc/rustc-dev-guide";
|
||||
builder.require_submodule(relative_path, None);
|
||||
|
||||
let src = builder.src.join(relative_path);
|
||||
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook).delay_failure();
|
||||
rustbook_cmd.arg("linkcheck").arg(&src);
|
||||
let toolstate =
|
||||
if rustbook_cmd.run(builder) { ToolState::TestPass } else { ToolState::TestFail };
|
||||
builder.save_toolstate("rustc-dev-guide", toolstate);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct CrateLibrustc {
|
||||
compiler: Compiler,
|
||||
|
|
|
|||
|
|
@ -76,10 +76,7 @@ static STABLE_TOOLS: &[(&str, &str)] = &[
|
|||
// We do require that we checked whether they build or not on the tools builder,
|
||||
// though, as otherwise we will be unable to file an issue if they start
|
||||
// failing.
|
||||
static NIGHTLY_TOOLS: &[(&str, &str)] = &[
|
||||
("embedded-book", "src/doc/embedded-book"),
|
||||
// ("rustc-dev-guide", "src/doc/rustc-dev-guide"),
|
||||
];
|
||||
static NIGHTLY_TOOLS: &[(&str, &str)] = &[("embedded-book", "src/doc/embedded-book")];
|
||||
|
||||
fn print_error(tool: &str, submodule: &str) {
|
||||
eprintln!();
|
||||
|
|
|
|||
|
|
@ -951,7 +951,6 @@ impl<'a> Builder<'a> {
|
|||
test::UnstableBook,
|
||||
test::RustcBook,
|
||||
test::LintDocs,
|
||||
test::RustcGuide,
|
||||
test::EmbeddedBook,
|
||||
test::EditionGuide,
|
||||
test::Rustfmt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue