Skip to content

Commit 82f40e0

Browse files
committed
Rollup merge of #104456 - RalfJung:miri, r=RalfJung
update Miri Not a huge sync, but there was a conflict and [josh](https://github.com/josh-project/josh/) seems to prefer those to be merged back ASAP.
2 parents fbc93c5 + 157b2d5 commit 82f40e0

File tree

22 files changed

+347
-374
lines changed

22 files changed

+347
-374
lines changed

Cargo.lock

+39-39
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ dependencies = [
214214
"regex-automata 0.1.10",
215215
]
216216

217+
[[package]]
218+
name = "bstr"
219+
version = "1.0.1"
220+
source = "registry+https://github.com/rust-lang/crates.io-index"
221+
checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd"
222+
dependencies = [
223+
"memchr",
224+
"once_cell",
225+
"regex-automata",
226+
"serde",
227+
]
228+
217229
[[package]]
218230
name = "build-manifest"
219231
version = "0.1.0"
@@ -919,25 +931,11 @@ dependencies = [
919931
"cfg-if 1.0.0",
920932
]
921933

922-
[[package]]
923-
name = "crossbeam"
924-
version = "0.8.1"
925-
source = "registry+https://github.com/rust-lang/crates.io-index"
926-
checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845"
927-
dependencies = [
928-
"cfg-if 1.0.0",
929-
"crossbeam-channel",
930-
"crossbeam-deque",
931-
"crossbeam-epoch",
932-
"crossbeam-queue",
933-
"crossbeam-utils",
934-
]
935-
936934
[[package]]
937935
name = "crossbeam-channel"
938-
version = "0.5.4"
936+
version = "0.5.6"
939937
source = "registry+https://github.com/rust-lang/crates.io-index"
940-
checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
938+
checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
941939
dependencies = [
942940
"cfg-if 1.0.0",
943941
"crossbeam-utils",
@@ -967,16 +965,6 @@ dependencies = [
967965
"scopeguard",
968966
]
969967

970-
[[package]]
971-
name = "crossbeam-queue"
972-
version = "0.3.5"
973-
source = "registry+https://github.com/rust-lang/crates.io-index"
974-
checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2"
975-
dependencies = [
976-
"cfg-if 1.0.0",
977-
"crossbeam-utils",
978-
]
979-
980968
[[package]]
981969
name = "crossbeam-utils"
982970
version = "0.8.8"
@@ -1260,6 +1248,15 @@ version = "0.2.0"
12601248
source = "registry+https://github.com/rust-lang/crates.io-index"
12611249
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
12621250

1251+
[[package]]
1252+
name = "fastrand"
1253+
version = "1.8.0"
1254+
source = "registry+https://github.com/rust-lang/crates.io-index"
1255+
checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
1256+
dependencies = [
1257+
"instant",
1258+
]
1259+
12631260
[[package]]
12641261
name = "filetime"
12651262
version = "0.2.14"
@@ -1584,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15841581
checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a"
15851582
dependencies = [
15861583
"aho-corasick",
1587-
"bstr",
1584+
"bstr 0.2.17",
15881585
"fnv",
15891586
"log",
15901587
"regex",
@@ -2414,17 +2411,17 @@ dependencies = [
24142411

24152412
[[package]]
24162413
name = "once_cell"
2417-
version = "1.12.0"
2414+
version = "1.16.0"
24182415
source = "registry+https://github.com/rust-lang/crates.io-index"
2419-
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
2416+
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
24202417

24212418
[[package]]
24222419
name = "opener"
24232420
version = "0.5.0"
24242421
source = "registry+https://github.com/rust-lang/crates.io-index"
24252422
checksum = "4ea3ebcd72a54701f56345f16785a6d3ac2df7e986d273eb4395c0b01db17952"
24262423
dependencies = [
2427-
"bstr",
2424+
"bstr 0.2.17",
24282425
"winapi",
24292426
]
24302427

@@ -3090,9 +3087,9 @@ dependencies = [
30903087

30913088
[[package]]
30923089
name = "rustc-build-sysroot"
3093-
version = "0.3.3"
3090+
version = "0.4.0"
30943091
source = "registry+https://github.com/rust-lang/crates.io-index"
3095-
checksum = "ec5f3689b6c560d6a3a17fcbe54204cd870b4fcf46342d60de16715b660d2c92"
3092+
checksum = "20c4b4625eeb148cccf82d5e9b90ad7fab3b11a0204cf75cc7fa04981a0fdffd"
30963093
dependencies = [
30973094
"anyhow",
30983095
"rustc_version",
@@ -3180,9 +3177,10 @@ dependencies = [
31803177
name = "rustc-workspace-hack"
31813178
version = "1.0.0"
31823179
dependencies = [
3183-
"bstr",
3180+
"bstr 0.2.17",
31843181
"clap 3.2.20",
31853182
"libz-sys",
3183+
"rand 0.8.5",
31863184
"regex",
31873185
"serde_json",
31883186
"syn",
@@ -4867,13 +4865,13 @@ dependencies = [
48674865

48684866
[[package]]
48694867
name = "tempfile"
4870-
version = "3.2.0"
4868+
version = "3.3.0"
48714869
source = "registry+https://github.com/rust-lang/crates.io-index"
4872-
checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
4870+
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
48734871
dependencies = [
48744872
"cfg-if 1.0.0",
4873+
"fastrand",
48754874
"libc",
4876-
"rand 0.8.5",
48774875
"redox_syscall",
48784876
"remove_dir_all",
48794877
"winapi",
@@ -5220,20 +5218,22 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
52205218

52215219
[[package]]
52225220
name = "ui_test"
5223-
version = "0.3.1"
5221+
version = "0.4.0"
52245222
source = "registry+https://github.com/rust-lang/crates.io-index"
5225-
checksum = "7d1f546a5883ae78da735bba529ec1116661e2f73582f23920d994dc97da3a22"
5223+
checksum = "bf4559da3fe6b481f8674a29379677cb9606cd6f75fc254a2c9834c55638503d"
52265224
dependencies = [
5225+
"bstr 1.0.1",
52275226
"cargo_metadata 0.15.0",
52285227
"color-eyre",
52295228
"colored",
5230-
"crossbeam",
5229+
"crossbeam-channel",
52315230
"diff",
52325231
"lazy_static",
52335232
"regex",
52345233
"rustc_version",
52355234
"serde",
52365235
"serde_json",
5236+
"tempfile",
52375237
]
52385238

52395239
[[package]]

src/tools/miri/.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ jobs:
6767
shell: bash
6868
run: |
6969
if [[ ${{ github.event_name }} == 'schedule' ]]; then
70-
./miri toolchain HEAD --host ${{ matrix.host_target }}
71-
else
72-
./miri toolchain "" --host ${{ matrix.host_target }}
70+
echo "Building against latest rustc git version"
71+
git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1 > rust-version
7372
fi
73+
./miri toolchain --host ${{ matrix.host_target }}
7474
7575
- name: Show Rust version
7676
run: |

src/tools/miri/CONTRIBUTING.md

+9-24
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ is set the `MIRI_LIB_SRC` environment variable to the `library` folder of a
150150
`rust-lang/rust` repository checkout. Note that changing files in that directory
151151
does not automatically trigger a re-build of the standard library; you have to
152152
clear the Miri build cache manually (on Linux, `rm -rf ~/.cache/miri`;
153-
and on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`).
153+
on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`;
154+
and on macOS, `rm -rf ~/Library/Caches/org.rust-lang.miri`).
154155

155156
### Benchmarking
156157

@@ -208,23 +209,6 @@ We described above the simplest way to get a working build environment for Miri,
208209
which is to use the version of rustc indicated by `rustc-version`. But
209210
sometimes, that is not enough.
210211

211-
### Updating `rustc-version`
212-
213-
The `rustc-version` file is regularly updated to keep Miri close to the latest
214-
version of rustc. Usually, new contributors do not have to worry about this. But
215-
sometimes a newer rustc is needed for a patch, and sometimes Miri needs fixing
216-
for changes in rustc. In both cases, `rustc-version` needs updating.
217-
218-
To update the `rustc-version` file and install the latest rustc, you can run:
219-
```
220-
./miri toolchain HEAD
221-
```
222-
223-
Now edit Miri until `./miri test` passes, and submit a PR. Generally, it is
224-
preferred to separate updating `rustc-version` and doing what it takes to get
225-
Miri working again, from implementing new features that rely on the updated
226-
rustc. This avoids blocking all Miri development on landing a big PR.
227-
228212
### Building Miri with a locally built rustc
229213

230214
[building Miri with a locally built rustc]: #building-miri-with-a-locally-built-rustc
@@ -282,13 +266,13 @@ With this, you should now have a working development setup! See
282266
## Advanced topic: Syncing with the rustc repo
283267

284268
We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit
285-
changes between the rustc and Miri repositories. For now, a fork of josh needs to be built
286-
from source. This downloads and runs josh:
269+
changes between the rustc and Miri repositories. For now, the latest git version
270+
of josh needs to be built from source. This downloads and runs josh:
287271

288272
```sh
289-
git clone https://github.com/RalfJung/josh
273+
git clone https://github.com/josh-project/josh
290274
cd josh
291-
cargo run --release -p josh-proxy -- --local=$(pwd)/local --remote=https://github.com --no-background
275+
cargo run --release -p josh-proxy -- --local=local --remote=https://github.com --no-background
292276
```
293277

294278
### Importing changes from the rustc repo
@@ -298,9 +282,10 @@ We assume we start on an up-to-date master branch in the Miri repo.
298282

299283
```sh
300284
# Fetch and merge rustc side of the history. Takes ca 5 min the first time.
285+
# This will also update the 'rustc-version' file.
301286
./miri rustc-pull
302-
# Update toolchain reference and apply formatting.
303-
./miri toolchain HEAD && ./miri fmt
287+
# Update local toolchain and apply formatting.
288+
./miri toolchain && ./miri fmt
304289
git commit -am "rustup"
305290
```
306291

0 commit comments

Comments
 (0)