Skip to content

Commit 4a73eba

Browse files
committed
Add tooling for performing Josh synces (#2183)
1 parent 63548be commit 4a73eba

File tree

7 files changed

+728
-43
lines changed

7 files changed

+728
-43
lines changed

Diff for: README.md

+18-43
Original file line numberDiff line numberDiff line change
@@ -70,46 +70,21 @@ $ ENABLE_LINKCHECK=1 mdbook serve
7070
We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
7171
including the `<!-- toc -->` marker at the place where you want the TOC.
7272

73-
## How to fix toolstate failures
74-
75-
> [!NOTE]
76-
> Currently, we do not track the rustc-dev-guide toolstate due to
77-
> [spurious failures](https://github.com/rust-lang/rust/pull/71731),
78-
> but we leave these instructions for when we do it again in the future.
79-
80-
1. You will get a ping from the toolstate commit. e.g. https://github.com/rust-lang-nursery/rust-toolstate/commit/8ffa0e4c30ac9ba8546b7046e5c4ccc2b96ebdd4
81-
82-
2. The commit contains a link to the PR that caused the breakage. e.g. https://github.com/rust-lang/rust/pull/64321
83-
84-
3. If you go to that PR's thread, there is a post from bors with a link to the CI status: https://github.com/rust-lang/rust/pull/64321#issuecomment-529763807
85-
86-
4. Follow the check-actions link to get to the Actions page for that build
87-
88-
5. There will be approximately 1 billion different jobs for the build. They are for different configurations and platforms. The rustc-dev-guide build only runs on the Linux x86_64-gnu-tools job. So click on that job in the list, which is about 60% down in the list.
89-
90-
6. Click the Run build step in the job to get the console log for the step.
91-
92-
7. Click on the log and Ctrl-f to get a search box in the log
93-
94-
8. Search for rustc-dev-guide. This gets you to the place where the links are checked. It is usually ~11K lines into the log.
95-
96-
9. Look at the links in the log near that point in the log
97-
98-
10. Fix those links in the rustc-dev-guide (by making a PR in the rustc-dev-guide repo)
99-
100-
11. Make a PR on the rust-lang/rust repo to update the rustc-dev-guide git submodule in src/docs/rustc-dev-guide.
101-
To make a PR, the following steps are useful.
102-
103-
```bash
104-
# Assuming you already cloned the rust-lang/rust repo and you're in the correct directory
105-
git submodule update --remote src/doc/rustc-dev-guide
106-
git add -u
107-
git commit -m "Update rustc-dev-guide"
108-
# Note that you can use -i, which is short for --incremental, in the following command
109-
./x test --incremental src/doc/rustc-dev-guide # This is optional and should succeed anyway
110-
# Open a PR in rust-lang/rust
111-
```
112-
113-
12. Wait for PR to merge
114-
115-
Voilà!
73+
## Synchronizing josh subtree with rustc
74+
75+
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the following commands to synchronize the subtree in both directions.
76+
77+
### Pull changes from `rust-lang/rust` into this repository
78+
1) Checkout a new branch that will be used to create a PR into `rust-lang/rustc-dev-guide`
79+
2) Run the pull command
80+
```
81+
$ cargo run --manifest-path josh-sync/Cargo.toml rustc-pull
82+
```
83+
3) Push the branch to your fork and create a PR into `rustc-dev-guide`
84+
85+
### Push changes from this repository into `rust-lang/rust`
86+
1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
87+
```
88+
$ cargo run --manifest-path josh-sync/Cargo.toml rustc-push <branch-name> <gh-username>
89+
```
90+
2) Create a PR from `<branch-name>` into `rust-lang/rust`

0 commit comments

Comments
 (0)