Skip to content

Commit 238c163

Browse files
Rollup merge of #140379 - tshepang:rdg-push, r=jieyouxu
rustc-dev-guide subtree update
2 parents 21f637c + f2e5577 commit 238c163

File tree

7 files changed

+49
-39
lines changed

7 files changed

+49
-39
lines changed

.github/workflows/rustc-pull.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Cache the josh directory with checked out rustc
2929
cache-directories: "/home/runner/.cache/rustc-dev-guide-josh"
3030
- name: Install josh
31-
run: RUSTFLAGS="--cap-lints warn" cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
31+
run: RUSTFLAGS="--cap-lints warn" cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
3232
- name: Setup bot git name and email
3333
run: |
3434
git config --global user.name 'The rustc-dev-guide Cronjob Bot'

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.g
7777
You'll need to install `josh-proxy` locally via
7878

7979
```
80-
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
80+
cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
8181
```
8282
Older versions of `josh-proxy` may not round trip commits losslessly so it is important to install this exact version.
8383

@@ -106,5 +106,5 @@ You may observe "Nothing to pull" even if you *know* rustc-pull has something to
106106
To minimize the likelihood of this happening, you may wish to keep a separate *minimal* git config that *only* has `[user]` entries from global git config, then repoint system git to use the minimal git config instead. E.g.
107107
108108
```
109-
GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo +stable run --manifest-path josh-sync/Cargo.toml -- rustc-pull
109+
GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
110110
```

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b8005bff3248cfc6e327faf4fa631ac49bb49ba9
1+
deb947971c8748f5c6203548ce4af9022f21eaf0

src/SUMMARY.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Summary
22

33
[Getting Started](./getting-started.md)
4+
45
[About this guide](./about-this-guide.md)
56

67
---
@@ -231,9 +232,13 @@
231232
---
232233

233234
[Appendix A: Background topics](./appendix/background.md)
235+
234236
[Appendix B: Glossary](./appendix/glossary.md)
237+
235238
[Appendix C: Code Index](./appendix/code-index.md)
239+
236240
[Appendix D: Compiler Lecture Series](./appendix/compiler-lecture.md)
241+
237242
[Appendix E: Bibliography](./appendix/bibliography.md)
238243

239244
[Appendix Z: HumorRust](./appendix/humorust.md)

src/autodiff/installation.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ rustup toolchain install nightly # enables -Z unstable-options
2525
You can then run our test cases:
2626

2727
```bash
28-
./x.py test --stage 1 library tests/ui/autodiff
29-
./x.py test --stage 1 library tests/codegen/autodiff
30-
./x.py test --stage 1 library tests/pretty/autodiff*
28+
./x.py test --stage 1 tests/codegen/autodiff
29+
./x.py test --stage 1 tests/pretty/autodiff
30+
./x.py test --stage 1 tests/ui/autodiff
31+
./x.py test --stage 1 tests/ui/feature-gates/feature-gate-autodiff.rs
3132
```
3233

3334
Autodiff is still experimental, so if you want to use it in your own projects, you will need to add `lto="fat"` to your Cargo.toml
@@ -44,7 +45,7 @@ apt install wget vim python3 git curl libssl-dev pkg-config lld ninja-build cmak
4445
```
4546
Then build rustc in a slightly altered way:
4647
```bash
47-
git clone --depth=1 https://github.com/EnzymeAD/rust.git
48+
git clone --depth=1 https://github.com/rust-lang/rust.git
4849
cd rust
4950
./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs
5051
./x dist
@@ -54,7 +55,8 @@ We then copy the tarball to our host. The dockerid is the newest entry under `do
5455
docker cp <dockerid>:/rust/build/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz rust-nightly-x86_64-unknown-linux-gnu.tar.gz
5556
```
5657
Afterwards we can create a new (pre-release) tag on the EnzymeAD/rust repository and make a PR against the EnzymeAD/enzyme-explorer repository to update the tag.
57-
Remember to ping `tgymnich` on the PR to run his update script.
58+
Remember to ping `tgymnich` on the PR to run his update script. Note: We should archive EnzymeAD/rust and update the instructions here. The explorer should soon
59+
be able to get the rustc toolchain from the official rust servers.
5860

5961

6062
## Build instruction for Enzyme itself

src/building/bootstrapping/what-bootstrapping-does.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ will be rare to want to use it. Finally, `MAGIC_EXTRA_RUSTFLAGS` bypasses the
394394
this is `compiletest`. For unit tests and doc tests this is the `libtest`
395395
runner.
396396

397-
Most test runner accept `--help`, which you can use to find out the options
398-
accepted by the runner.
397+
Most test runners accept `--help`,
398+
which you can use to find out the options accepted by the runner.
399399

400400
## Environment Variables
401401

src/git.md

+31-28
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ If you've cloned your fork, then you will be able to reference it with `origin`
3838
in your local repo. It may be helpful to also set up a remote for the official
3939
rust-lang/rust repo via
4040

41-
```sh
41+
```console
4242
git remote add upstream https://github.com/rust-lang/rust.git
4343
```
4444

4545
if you're using HTTPS, or
4646

47-
```sh
47+
```console
4848
git remote add upstream git@github.com:rust-lang/rust.git
4949
```
5050

@@ -112,7 +112,7 @@ See [Rebasing](#rebasing) for more about rebasing.
112112
This is not a problem from git's perspective. If you run `git remote -v`,
113113
it will say something like this:
114114

115-
```
115+
```console
116116
$ git remote -v
117117
origin git@github.com:jyn514/rust.git (fetch)
118118
origin git@github.com:jyn514/rust.git (push)
@@ -158,11 +158,11 @@ To fix it, do the following things:
158158
### I see "error: cannot rebase" when I try to rebase
159159

160160
These are two common errors to see when rebasing:
161-
```
161+
```console
162162
error: cannot rebase: Your index contains uncommitted changes.
163163
error: Please commit or stash them.
164164
```
165-
```
165+
```console
166166
error: cannot rebase: You have unstaged changes.
167167
error: Please commit or stash them.
168168
```
@@ -174,7 +174,7 @@ commit your changes, or make a temporary commit called a "stash" to have them st
174174
when you finish rebasing. You may want to configure git to make this "stash" automatically, which
175175
will prevent the "cannot rebase" error in nearly all cases:
176176

177-
```
177+
```console
178178
git config --global rebase.autostash true
179179
```
180180

@@ -205,7 +205,7 @@ git reset --hard master
205205

206206
`git push` will not work properly and say something like this:
207207

208-
```
208+
```console
209209
! [rejected] issue-xxxxx -> issue-xxxxx (non-fast-forward)
210210
error: failed to push some refs to 'https://github.com/username/rust.git'
211211
hint: Updates were rejected because the tip of your current branch is behind
@@ -226,7 +226,7 @@ didn't write, it likely means you're trying to rebase over the wrong branch. For
226226
have a `rust-lang/rust` remote `upstream`, but ran `git rebase origin/master` instead of `git rebase
227227
upstream/master`. The fix is to abort the rebase and use the correct branch instead:
228228

229-
```
229+
```console
230230
git rebase --abort
231231
git rebase -i upstream/master
232232
```
@@ -243,7 +243,7 @@ When updating your local repository with `git pull`, you may notice that sometim
243243
Git says you have modified some files that you have never edited. For example,
244244
running `git status` gives you something like (note the `new commits` mention):
245245

246-
```
246+
```console
247247
On branch master
248248
Your branch is up to date with 'origin/master'.
249249

@@ -256,9 +256,12 @@ Changes not staged for commit:
256256
no changes added to commit (use "git add" and/or "git commit -a")
257257
```
258258

259-
These changes are not changes to files: they are changes to submodules (more on this
260-
[later](#git-submodules)). To get rid of those, run `./x --help`, which will automatically update
261-
the submodules.
259+
These changes are not changes to files: they are changes to submodules (more on this [later](#git-submodules)).
260+
To get rid of those:
261+
262+
```console
263+
git submodule update
264+
```
262265

263266
Some submodules are not actually needed; for example, `src/llvm-project` doesn't need to be checked
264267
out if you're using `download-ci-llvm`. To avoid having to keep fetching its history, you can use
@@ -278,12 +281,12 @@ merged. To do that, you need to rebase your work on top of rust-lang/rust.
278281
To rebase your feature branch on top of the newest version of the master branch
279282
of rust-lang/rust, checkout your branch, and then run this command:
280283

281-
```
284+
```console
282285
git pull --rebase https://github.com/rust-lang/rust.git master
283286
```
284287

285288
> If you are met with the following error:
286-
> ```
289+
> ```console
287290
> error: cannot pull with rebase: Your index contains uncommitted changes.
288291
> error: please commit or stash them.
289292
> ```
@@ -300,13 +303,13 @@ reapply the changes fails because your changes conflicted with other changes
300303
that have been made. You can tell that this happened because you'll see
301304
lines in the output that look like
302305
303-
```
306+
```console
304307
CONFLICT (content): Merge conflict in file.rs
305308
```
306309
307310
When you open these files, you'll see sections of the form
308311

309-
```
312+
```console
310313
<<<<<<< HEAD
311314
Original code
312315
=======
@@ -346,7 +349,7 @@ will keep it up-to-date. You will also want to rebase your feature branches
346349
up-to-date as well. After pulling, you can checkout the feature branches
347350
and rebase them:
348351

349-
```
352+
```console
350353
git checkout master
351354
git pull upstream master --ff-only # to make certain there are no merge commits
352355
git rebase master feature_branch
@@ -384,7 +387,7 @@ change the order in which they are applied, or "squash" them into each other.
384387

385388
Alternatively, you can sacrifice the commit history like this:
386389

387-
```
390+
```console
388391
# squash all the changes into one commit so you only have to worry about conflicts once
389392
git rebase -i --keep-base master # and squash all changes along the way
390393
git rebase master
@@ -422,7 +425,7 @@ it shows you the differences between your old diff and your new diff.
422425
Here's an example of `git range-diff` output (taken from [Git's
423426
docs][range-diff-example-docs]):
424427

425-
```
428+
```console
426429
-: ------- > 1: 0ddba11 Prepare for the inevitable!
427430
1: c0debee = 2: cab005e Add a helpful message at the start
428431
2: f00dbal ! 3: decafe1 Describe a bug
@@ -499,7 +502,7 @@ Git and Github's default diff view for large moves *within* a file is quite poor
499502
line as deleted and each line as added, forcing you to compare each line yourself. Git has an option
500503
to show moved lines in a different color:
501504

502-
```
505+
```console
503506
git log -p --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change
504507
```
505508

@@ -515,7 +518,7 @@ that was force-pushed to make sure there are no unexpected changes.
515518
Many large files in the repo are autogenerated. To view a diff that ignores changes to those files,
516519
you can use the following syntax (e.g. Cargo.lock):
517520

518-
```
521+
```console
519522
git log -p ':!Cargo.lock'
520523
```
521524

@@ -545,7 +548,7 @@ The contents of submodules are ignored by Git: submodules are in some sense isol
545548
from the rest of the repository. However, if you try to `cd src/llvm-project` and then
546549
run `git status`:
547550

548-
```
551+
```console
549552
HEAD detached at 9567f08afc943
550553
nothing to commit, working tree clean
551554
```
@@ -576,7 +579,7 @@ that Git can nicely and fairly conveniently handle for us.
576579

577580
Sometimes you might run into (when you run `git status`)
578581

579-
```
582+
```console
580583
Changes not staged for commit:
581584
(use "git add <file>..." to update what will be committed)
582585
(use "git restore <file>..." to discard changes in working directory)
@@ -586,7 +589,7 @@ Changes not staged for commit:
586589

587590
and when you try to run `git submodule update` it breaks horribly with errors like
588591

589-
```
592+
```console
590593
error: RPC failed; curl 92 HTTP/2 stream 7 was not closed cleanly: CANCEL (err 8)
591594
error: 2782 bytes of body are still expected
592595
fetch-pack: unexpected disconnect while reading sideband packet
@@ -597,8 +600,8 @@ fatal: Fetched in submodule path 'src/llvm-project', but it did not contain 5a51
597600

598601
If you see `(new commits, modified content)` you can run
599602

600-
```bash
601-
$ git submodule foreach git reset --hard
603+
```console
604+
git submodule foreach git reset --hard
602605
```
603606

604607
and then try `git submodule update` again.
@@ -607,7 +610,7 @@ and then try `git submodule update` again.
607610

608611
If that doesn't work, you can try to deinit all git submodules...
609612

610-
```
613+
```console
611614
git submodule deinit -f --all
612615
```
613616

@@ -618,7 +621,7 @@ completely messed up for some reason.
618621

619622
Sometimes, for some forsaken reason, you might run into
620623

621-
```text
624+
```console
622625
fatal: not a git repository: src/gcc/../../.git/modules/src/gcc
623626
```
624627

0 commit comments

Comments
 (0)