Skip to content

[CI test] Turn rustc-dev-guide into a subtree #134083

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

Closed
wants to merge 2,547 commits into from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 9, 2024

This is a test PR to check what happens if we move rustc-dev-guide into a subtree. This move was discussed on Zulip.

Used instructions from https://gist.github.com/Nikita240/0c98cea8f53a15e69699cd8bc40657c4. More specifically, ran:

DIR=src/doc/rustc-dev-guide

git submodule status ${DIR}
# b21d99b770f9aceb0810c843847c52f86f45d2ed
git submodule deinit ${DIR}
git rm -r --cached ${DIR}
rm -rf ${DIR}
git commit -m"Removed ${DIR}"
git subtree add -P src/doc/rustc-dev-guide https://github.com/rust-lang/rustc-dev-guide b21d99b770f9aceb0810c843847c52f86f45d2ed

r? @jieyouxu

jieyouxu and others added 30 commits March 8, 2024 17:44
* adding links

* Update src/rustc-driver-interacting-with-the-ast.md

Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>

* redo links and formatting

* Update rustc-driver-interacting-with-the-ast.md

---------

Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>
Minor additions and resorting.
Also
- use proper case for rust-analyzer
- reformat a bit, for sembr
* Extract Bootstrap into its own section

Add brief explanation for `Step` and `Builder::ensure` as core
Bootstrap internal concepts.

* Drop common commands page (use `x --help` instead)

* Add `make` as an alternative entry point

* Add src/bootstrap/README.md link
* Update test-implementation.md

* Update test-implementation.md
* Update rustdoc-internals.md

Minor updates to syntax and some clarifications.

* updates

* Update rustdoc-internals.md
The 'read this chapter' link under the 'What is x.py?' section
returned a Document not found (404) error.
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
Signed-off-by: JohnEndson <jiayuzhen@outlook.com>
It's super annoying to be forced to use this bad convention, and
apparently everyone agrees. The only reason no improvements have been
done is because those were blocked on writing a better checker.

I strongly believe that no checker is better than a bad checker, so
let's just delete it in the meantime. I kindly asked anyone who sees
this to complain about overly long sentences in review in the future, I
think we can make this turn out fine.
* Add quickstart for how to build and run the compiler

The chapter is quite long, and a lot of the information is, while
valuable, not very important for newcomers. I think it makes sense to
have a condensed version for anyone just wanting to get started with
only the most important information.

* A few improvements to quickstart
@rust-log-analyzer

This comment has been minimized.

@ehuss
Copy link
Contributor

ehuss commented Dec 9, 2024

Before merging this, can you please coordinate with me to get the automation and such ready?
Also, it would be good to know who will be responsible for keeping this in sync.

@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 9, 2024

I probably do not intend to merge this PR 😁 It's mostly just for testing and discussions. Once we figure out the right way forward and prepare the automation, I'll probably create another one.

@ehuss
Copy link
Contributor

ehuss commented Dec 9, 2024

You might also want to update the RustcGuide test step to not require a submodule. I don't know if that test step is actually functional right now, since it currently is unused. But might as well fix that just in case someone wants to get it working again.

(Or just remove RustcGuide, I don't know how likely it is anyone will be using it in the future. 🤷 )

@Kobzol Kobzol force-pushed the rustc-dev-guide-subtree branch from fd3ace8 to 4416267 Compare December 9, 2024 18:05
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Dec 9, 2024
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 9, 2024

Yeah, I did that in the last few commits, forgot to push them before. The RustcGuide step was completely useless before, it was using a mdbook linkcheck command that hasn't existed for a while.

I added a doc src/doc/rustc-dev-guide step, but when the linkchecker runs on it, it fails, because rustc-dev-guide currently disables its linkchecker due to some bugs :/

@rust-log-analyzer

This comment has been minimized.

@jieyouxu jieyouxu added the S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. label Dec 10, 2024
@Kobzol Kobzol force-pushed the rustc-dev-guide-subtree branch from 4416267 to c40accb Compare December 10, 2024 15:41
@jieyouxu jieyouxu added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 10, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 27.8s done
#16 DONE 40.7s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
  Downloaded boml v0.3.1
   Compiling boml v0.3.1
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished `release` profile [optimized] target(s) in 3.94s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
Doc path: /checkout/obj/build/x86_64-unknown-linux-gnu/doc/edition-guide/index.html
Rustbook (x86_64-unknown-linux-gnu) - style-guide
Doc path: /checkout/obj/build/x86_64-unknown-linux-gnu/doc/style-guide/index.html
Rustbook (x86_64-unknown-linux-gnu) - rustc-dev-guide
[2024-12-10T16:27:34Z WARN  mdbook::preprocess::cmd] The command wasn't found, is the "mermaid" preprocessor installed?
[2024-12-10T16:27:34Z WARN  mdbook::preprocess::cmd]  Command: mdbook-mermaid
[2024-12-10T16:27:34Z WARN  mdbook::preprocess::cmd] The command wasn't found, is the "toc" preprocessor installed?
[2024-12-10T16:27:34Z WARN  mdbook::preprocess::cmd]  Command: mdbook-toc
[2024-12-10T16:27:35Z WARN  mdbook::preprocess::cmd] The command wasn't found, is the "mermaid" preprocessor installed?
[2024-12-10T16:27:35Z WARN  mdbook::preprocess::cmd]  Command: mdbook-mermaid
[2024-12-10T16:27:35Z WARN  mdbook::preprocess::cmd] The command wasn't found, is the "toc" preprocessor installed?
[2024-12-10T16:27:35Z WARN  mdbook::preprocess::cmd]  Command: mdbook-toc
*** WARNING: linkcheck temporarily disabled due to bugs ***
Command has failed. Rerun with -v to see more details.
  local time: Tue Dec 10 16:27:35 UTC 2024
  network time: Tue, 10 Dec 2024 16:27:39 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@jieyouxu jieyouxu removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 14, 2024
@bors
Copy link
Collaborator

bors commented Dec 19, 2024

☔ The latest upstream changes (presumably #134492) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 19, 2024
@Kobzol Kobzol changed the title [CI test] Turn rustc-dev-guide into a subtree [CI test] Turn rustc-dev-guide into a (Josh) subtree Dec 29, 2024
@Kobzol Kobzol changed the title [CI test] Turn rustc-dev-guide into a (Josh) subtree [CI test] Turn rustc-dev-guide into a subtree Dec 29, 2024
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 30, 2024

Closing in favour of #134907.

@Kobzol Kobzol closed this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.