Skip to content

Commit 63c5542

Browse files
committed
Auto merge of #3036 - RalfJung:josh-autostart, r=RalfJung
automatically start and stop josh in rustc-pull/push Let's make use of the fact that this is not a shell script any more. :)
2 parents d4caecc + e341a3f commit 63c5542

File tree

7 files changed

+214
-26
lines changed

7 files changed

+214
-26
lines changed

.github/workflows/ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ jobs:
189189
fetch-depth: 256 # get a bit more of the history
190190
- name: install josh-proxy
191191
run: cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
192-
- name: start josh-proxy
193-
run: josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background &
194192
- name: setup bot git name and email
195193
run: |
196194
git config --global user.name 'The Miri Conjob Bot'

CONTRIBUTING.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -231,25 +231,16 @@ You can also directly run Miri on a Rust source file:
231231
## Advanced topic: Syncing with the rustc repo
232232

233233
We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit changes between the
234-
rustc and Miri repositories.
234+
rustc and Miri repositories. You can install it as follows:
235235

236236
```sh
237237
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
238-
josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background
239238
```
240239

241-
This uses a directory `$HOME/.cache/josh` as a cache, to speed up repeated pulling/pushing.
242-
243-
To make josh push via ssh instead of https, you can add the following to your `.gitconfig`:
244-
245-
```toml
246-
[url "git@github.com:"]
247-
pushInsteadOf = https://github.com/
248-
```
240+
Josh will automatically be started and stopped by `./miri`.
249241

250242
### Importing changes from the rustc repo
251243

252-
Josh needs to be running, as described above.
253244
We assume we start on an up-to-date master branch in the Miri repo.
254245

255246
```sh
@@ -268,16 +259,14 @@ needed.
268259

269260
### Exporting changes to the rustc repo
270261

271-
Keep in mind that pushing is the most complicated job that josh has to do --
272-
pulling just filters the rustc history, but pushing needs to construct a new
273-
rustc history that would filter to the given Miri history! To avoid problems, it
274-
is a good idea to always pull immediately before you push. In particular, you
275-
should never do two josh pushes without an intermediate pull; that can lead to
276-
duplicated commits.
262+
Keep in mind that pushing is the most complicated job that josh has to do -- pulling just filters
263+
the rustc history, but pushing needs to construct a new rustc history that would filter to the given
264+
Miri history! To avoid problems, it is a good idea to always pull immediately before you push. If
265+
you are getting strange errors, chances are you are running into [this josh
266+
bug](https://github.com/josh-project/josh/issues/998). In that case, please get in touch on Zulip.
277267

278-
Josh needs to be running, as described above. We will use the josh proxy to push
279-
to your fork of rustc. Run the following in the Miri repo, assuming we are on an
280-
up-to-date master branch:
268+
We will use the josh proxy to push to your fork of rustc. Run the following in the Miri repo,
269+
assuming we are on an up-to-date master branch:
281270

282271
```sh
283272
# Push the Miri changes to your rustc fork (substitute your github handle for YOUR_NAME).
@@ -287,3 +276,11 @@ up-to-date master branch:
287276
This will create a new branch called 'miri' in your fork, and the output should
288277
include a link to create a rustc PR that will integrate those changes into the
289278
main repository.
279+
280+
If this fails due to authentication problems, it can help to make josh push via ssh instead of
281+
https. Add the following to your `.gitconfig`:
282+
283+
```toml
284+
[url "git@github.com:"]
285+
pushInsteadOf = https://github.com/
286+
```

miri-script/Cargo.lock

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

miri-script/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ anyhow = "1.0"
2020
xshell = "0.2"
2121
rustc_version = "0.4"
2222
dunce = "1.0.4"
23+
directories = "4"

0 commit comments

Comments
 (0)