@@ -165,16 +165,17 @@ to `.vscode/settings.json` in your local Miri clone:
165165{
166166 "rust-analyzer.rustc.source" : " discover" ,
167167 "rust-analyzer.linkedProjects" : [
168- " ./Cargo.toml" ,
169- " ./cargo-miri/Cargo.toml"
168+ " Cargo.toml" ,
169+ " cargo-miri/Cargo.toml" ,
170+ " miri-script/Cargo.toml" ,
170171 ],
171- "rust-analyzer.checkOnSave .overrideCommand" : [
172+ "rust-analyzer.check .overrideCommand" : [
172173 " env" ,
173174 " MIRI_AUTO_OPS=no" ,
174175 " ./miri" ,
175176 " cargo" ,
176177 " clippy" , // make this `check` when working with a locally built rustc
177- " --message-format=json"
178+ " --message-format=json" ,
178179 ],
179180 // Contrary to what the name suggests, this also affects proc macros.
180181 "rust-analyzer.cargo.buildScripts.overrideCommand" : [
@@ -230,25 +231,16 @@ You can also directly run Miri on a Rust source file:
230231## Advanced topic: Syncing with the rustc repo
231232
232233We use the [ ` josh ` proxy] ( https://github.com/josh-project/josh ) to transmit changes between the
233- rustc and Miri repositories.
234+ rustc and Miri repositories. You can install it as follows:
234235
235236``` sh
236237cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
237- josh-proxy --local=$HOME /.cache/josh --remote=https://github.com --no-background
238238```
239239
240- This uses a directory ` $HOME/.cache/josh ` as a cache, to speed up repeated pulling/pushing.
241-
242- To make josh push via ssh instead of https, you can add the following to your ` .gitconfig ` :
243-
244- ``` toml
245- [url "git@github .com:" ]
246- pushInsteadOf = https://github.com/
247- ```
240+ Josh will automatically be started and stopped by ` ./miri ` .
248241
249242### Importing changes from the rustc repo
250243
251- Josh needs to be running, as described above.
252244We assume we start on an up-to-date master branch in the Miri repo.
253245
254246``` sh
@@ -267,16 +259,14 @@ needed.
267259
268260### Exporting changes to the rustc repo
269261
270- Keep in mind that pushing is the most complicated job that josh has to do --
271- pulling just filters the rustc history, but pushing needs to construct a new
272- rustc history that would filter to the given Miri history! To avoid problems, it
273- is a good idea to always pull immediately before you push. In particular, you
274- should never do two josh pushes without an intermediate pull; that can lead to
275- 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.
276267
277- Josh needs to be running, as described above. We will use the josh proxy to push
278- to your fork of rustc. Run the following in the Miri repo, assuming we are on an
279- 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:
280270
281271``` sh
282272# Push the Miri changes to your rustc fork (substitute your github handle for YOUR_NAME).
@@ -286,3 +276,11 @@ up-to-date master branch:
286276This will create a new branch called 'miri' in your fork, and the output should
287277include a link to create a rustc PR that will integrate those changes into the
288278main 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+ ```
0 commit comments