Skip to content

Commit 6e5143d

Browse files
committed
Auto merge of #144633 - Zalathar:rollup-h984m13, r=Zalathar
Rollup of 13 pull requests Successful merges: - rust-lang/rust#144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - rust-lang/rust#144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - rust-lang/rust#144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - rust-lang/rust#144451 (fix: Reject upvar scrutinees for `loop_match`) - rust-lang/rust#144482 (Add explicit download methods to download module in bootstrap) - rust-lang/rust#144500 (thread name in stack overflow message) - rust-lang/rust#144511 (tidy: increase performance of auto extra checks feature) - rust-lang/rust#144599 (bootstrap: enable tidy auto extra checks on tools profile) - rust-lang/rust#144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - rust-lang/rust#144609 (feat: Right align line numbers) - rust-lang/rust#144623 (miri subtree update) - rust-lang/rust#144626 (cc dependencies: clarify comment) - rust-lang/rust#144627 (Add a test case for the issue rust-lang/rust#129882) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0e6d594 + 1bb45f9 commit 6e5143d

File tree

101 files changed

+2601
-1468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2601
-1468
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ jobs:
4545
os: macos-latest
4646
- host_target: i686-pc-windows-msvc
4747
os: windows-latest
48+
- host_target: aarch64-pc-windows-msvc
49+
os: windows-11-arm
4850
runs-on: ${{ matrix.os }}
4951
env:
5052
HOST_TARGET: ${{ matrix.host_target }}
5153
steps:
5254
- uses: actions/checkout@v4
55+
- name: apt update
56+
if: ${{ startsWith(matrix.os, 'ubuntu') }}
57+
# The runners seem to have outdated apt repos sometimes
58+
run: sudo apt update
5359
- name: install qemu
5460
if: ${{ matrix.qemu }}
5561
run: sudo apt install qemu-user qemu-user-binfmt
@@ -63,6 +69,12 @@ jobs:
6369
sudo apt update
6470
# Install needed packages
6571
sudo apt install $(echo "libatomic1: zlib1g-dev:" | sed 's/:/:${{ matrix.multiarch }}/g')
72+
- name: Install rustup on Windows ARM
73+
if: ${{ matrix.os == 'windows-11-arm' }}
74+
run: |
75+
curl -LOs https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
76+
./rustup-init.exe -y --no-modify-path
77+
echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH"
6678
- uses: ./.github/workflows/setup
6779
with:
6880
toolchain_flags: "--host ${{ matrix.host_target }}"
@@ -147,35 +159,48 @@ jobs:
147159
- uses: actions/checkout@v4
148160
with:
149161
fetch-depth: 256 # get a bit more of the history
150-
- name: install josh-proxy
151-
run: cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
162+
- name: install josh-sync
163+
run: cargo +stable install --locked --git https://github.com/rust-lang/josh-sync
152164
- name: setup bot git name and email
153165
run: |
154166
git config --global user.name 'The Miri Cronjob Bot'
155167
git config --global user.email 'miri@cron.bot'
156168
- name: Install nightly toolchain
157169
run: rustup toolchain install nightly --profile minimal
158-
- name: get changes from rustc
159-
run: ./miri rustc-pull
160170
- name: Install rustup-toolchain-install-master
161171
run: cargo install -f rustup-toolchain-install-master
162-
- name: format changes (if any)
172+
- name: Push changes to a branch and create PR
163173
run: |
174+
# Make it easier to see what happens.
175+
set -x
176+
# Temporarily disable early exit to examine the status code of rustc-josh-sync
177+
set +e
178+
rustc-josh-sync pull
179+
exitcode=$?
180+
set -e
181+
182+
# If there were no changes to pull, rustc-josh-sync returns status code 2.
183+
# In that case, skip the rest of the job.
184+
if [ $exitcode -eq 2 ]; then
185+
echo "Nothing changed in rustc, skipping PR"
186+
exit 0
187+
elif [ $exitcode -ne 0 ]; then
188+
# If return code was not 0 or 2, rustc-josh-sync actually failed
189+
echo "error: rustc-josh-sync failed"
190+
exit ${exitcode}
191+
fi
192+
193+
# Format changes
164194
./miri toolchain
165195
./miri fmt --check || (./miri fmt && git commit -am "fmt")
166-
- name: Push changes to a branch and create PR
167-
run: |
168-
# `git diff --exit-code` "succeeds" if the diff is empty.
169-
if git diff --exit-code HEAD^; then echo "Nothing changed in rustc, skipping PR"; exit 0; fi
170-
# The diff is non-empty, create a PR.
196+
197+
# Create a PR
171198
BRANCH="rustup-$(date -u +%Y-%m-%d)"
172199
git switch -c $BRANCH
173200
git push -u origin $BRANCH
174201
gh pr create -B master --title 'Automatic Rustup' --body 'Please close and re-open this PR to trigger CI, then enable auto-merge.'
175202
env:
176203
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
178-
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
179204

180205
cron-fail-notify:
181206
name: cronjob failure notification
@@ -198,7 +223,7 @@ jobs:
198223
It would appear that the [Miri cron job build]('"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"') failed.
199224
200225
This likely means that rustc changed the miri directory and
201-
we now need to do a [`./miri rustc-pull`](https://github.com/rust-lang/miri/blob/master/CONTRIBUTING.md#importing-changes-from-the-rustc-repo).
226+
we now need to do a [`rustc-josh-sync pull`](https://github.com/rust-lang/miri/blob/master/CONTRIBUTING.md#importing-changes-from-the-rustc-repo).
202227
203228
Would you mind investigating this issue?
204229

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
target
2-
/doc
32
tex/*/out
43
*.dot
54
*.out

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,25 +297,27 @@ You can also directly run Miri on a Rust source file:
297297

298298
## Advanced topic: Syncing with the rustc repo
299299

300-
We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit changes between the
300+
We use the [`josh-sync`](https://github.com/rust-lang/josh-sync) tool to transmit changes between the
301301
rustc and Miri repositories. You can install it as follows:
302302

303303
```sh
304-
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
304+
cargo install --locked --git https://github.com/rust-lang/josh-sync
305305
```
306306

307-
Josh will automatically be started and stopped by `./miri`.
307+
The commands below will automatically install and manage the [Josh](https://github.com/josh-project/josh) proxy that performs the actual work.
308308

309309
### Importing changes from the rustc repo
310310

311311
*Note: this usually happens automatically, so these steps rarely have to be done by hand.*
312312

313313
We assume we start on an up-to-date master branch in the Miri repo.
314314

315+
1) First, create a branch for the pull, e.g. `git checkout -b rustup`
316+
2) Then run the following:
315317
```sh
316318
# Fetch and merge rustc side of the history. Takes ca 5 min the first time.
317319
# This will also update the `rustc-version` file.
318-
./miri rustc-pull
320+
rustc-josh-sync pull
319321
# Update local toolchain and apply formatting.
320322
./miri toolchain && ./miri fmt
321323
git commit -am "rustup"
@@ -328,12 +330,12 @@ needed.
328330

329331
### Exporting changes to the rustc repo
330332

331-
We will use the josh proxy to push to your fork of rustc. Run the following in the Miri repo,
333+
We will use the `josh-sync` tool to push to your fork of rustc. Run the following in the Miri repo,
332334
assuming we are on an up-to-date master branch:
333335

334336
```sh
335337
# Push the Miri changes to your rustc fork (substitute your github handle for YOUR_NAME).
336-
./miri rustc-push YOUR_NAME miri
338+
rustc-josh-sync push miri YOUR_NAME
337339
```
338340

339341
This will create a new branch called `miri` in your fork, and the output should include a link that

0 commit comments

Comments
 (0)