Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
0ce3df0
feat(make): add self-documenting help target and clean up idioms
cds-amal Mar 8, 2026
0018542
fix(make): drop non-portable \s from awk patterns in help target
cds-amal Mar 8, 2026
3e1f766
fix(ty_visitor): catch rustc panics during layout computation
cds-amal Mar 8, 2026
efb78c9
feat(make): add stdlib-smir target for generating stdlib smir.json
cds-amal Mar 8, 2026
813804c
fix(cargo_stable_mir_json): derive toolchain lib path dynamically
cds-amal Mar 8, 2026
2cb1ad5
refactor(make): stdlib-smir uses binary directly, not wrapper script
cds-amal Mar 8, 2026
2310378
refactor: derive rustc commit from toolchain, drop metadata field
cds-amal Mar 8, 2026
2c30c5d
feat: add build.rs cfg detection for multi-nightly stable MIR support
cds-amal Mar 9, 2026
32a238f
refactor(build): replace cargo warnings with eprintln, add build-info…
cds-amal Mar 9, 2026
dc42ac4
feat(build): add smir_has_raw_ptr_kind breakpoint for AddressOf change
cds-amal Mar 9, 2026
8d8416c
feat(build): add compat breakpoints for RunCompiler and MonoItemParti…
cds-amal Mar 9, 2026
a32c5e9
feat(ui-tests): per-nightly effective test lists via base+delta
cds-amal Mar 9, 2026
4fa068f
docs(ui-tests): update README for base+delta test list workflow
cds-amal Mar 9, 2026
4f04a8d
feat(make): add test-ui-emit target for generating per-nightly test l…
cds-amal Mar 9, 2026
a650784
bump pinned nightly to 2025-03-01
cds-amal Mar 9, 2026
63f058f
chore(fmt): cargo fmt
cds-amal Mar 9, 2026
72cf997
fix(integration): normalise unstable interned IDs for cross-platform …
cds-amal Mar 9, 2026
a5ede03
feat(compat): add IndexedVal shim for nightly >= 2025-07-05
cds-amal Mar 9, 2026
a90152d
fix(compat): gate stable_mir import on old-nightly cfg path
cds-amal Mar 9, 2026
a245efa
docs: add nightly compatibility guide for maintainers
cds-amal Mar 9, 2026
2f704fd
refactor(test): per-nightly golden files for integration tests
cds-amal Mar 9, 2026
9e618c6
fix: address new warnings on nightly-2025-07-05, cargo fmt
cds-amal Mar 9, 2026
ef98ba9
bump pinned nightly to 2025-07-05
cds-amal Mar 9, 2026
7219ac6
docs: update for per-nightly golden files and toolchain bump
cds-amal Mar 9, 2026
dc94214
feat(compat): handle rustc_internal move from rustc_smir to stable_mir
cds-amal Mar 9, 2026
e132627
docs: add rustc_internal_moved breakpoint to compat guide
cds-amal Mar 9, 2026
ba70369
test: add golden files for nightly-2025-07-08
cds-amal Mar 9, 2026
7f98c71
fix: inline format args to satisfy clippy uninlined_format_args lint
cds-amal Mar 9, 2026
46d244e
add standalone make fmt and make clippy targets
cds-amal Mar 9, 2026
a3e0b25
cargo fmt
cds-amal Mar 9, 2026
df8743c
feat(compat): handle GlobalAlloc::TypeId variant added in nightly-202…
cds-amal Mar 9, 2026
244a3c8
docs: add GlobalAlloc::TypeId breakpoint to compat guide
cds-amal Mar 9, 2026
ec59bbc
cargo fmt
cds-amal Mar 9, 2026
315846f
bump pinned nightly to 2025-07-11
cds-amal Mar 9, 2026
947f393
docs: document rustc_public epoch boundary at nightly-2025-07-15
cds-amal Mar 9, 2026
7b55df8
fix(ui-tests): handle filenames with $ in diff_test_lists.sh
cds-amal Mar 9, 2026
5478318
feat(ui-tests): add effective test lists for nightly-2025-07-11
cds-amal Mar 9, 2026
7603b2e
docs: update pr.md with nightly-2025-07-11 UI test coverage
cds-amal Mar 9, 2026
deed51a
docs: add stdlib smir.json instructions to README
cds-amal Mar 9, 2026
10f4cfd
feat(compat): handle the rustc_public crate rename (nightly-2025-07-15)
cds-amal Mar 10, 2026
18b41af
fix(ui-tests): raise diff.renameLimit to avoid silent rename truncation
cds-amal Mar 10, 2026
cf9dea5
fix(ui-tests): clean up stale entries and correct override comments
cds-amal Mar 10, 2026
37b55c0
feat(ui-tests): add effective test lists for nightly-2025-07-15
cds-amal Mar 10, 2026
ddfefe1
docs: correct the "epoch boundary" misdiagnosis; it's just a crate re…
cds-amal Mar 10, 2026
15f3834
feat(ui-tests): add awk-based directive parser for test metadata
cds-amal Mar 10, 2026
c4b7150
refactor(ui-tests): rewrite test harness to use the awk directive parser
cds-amal Mar 10, 2026
e865e3a
test(ui-tests): add unit tests and boundary notes for the directive p…
cds-amal Mar 10, 2026
f1c7f6b
Cargo fmt
cds-amal Mar 10, 2026
f9a761e
bump pinned nightly to 2025-07-15 and display supported range in README
cds-amal Mar 10, 2026
ee870ff
test(integration): add golden files for nightly-2025-07-15
cds-amal Mar 10, 2026
c6ee050
feat(compat): handle Coroutine movability removal (nightly-2025-07-26)
cds-amal Mar 10, 2026
6d3461f
test: add golden files and UI test lists for nightly-2025-07-26
cds-amal Mar 10, 2026
8b7b84f
bump pinned nightly to 2025-07-26
cds-amal Mar 10, 2026
b8eed33
feat: add nightly admin script for toolchain management
cds-amal Mar 10, 2026
2db338f
feat(compat): handle DynKind removal from TyKind::Dynamic (nightly-20…
cds-amal Mar 10, 2026
b2edca7
test: add golden files and UI test lists for nightly-2025-09-19
cds-amal Mar 10, 2026
196d73c
bump pinned nightly to 2025-09-19
cds-amal Mar 10, 2026
beb092e
feat(compat): handle ProjectionElem::Subtype removal (nightly-2025-10…
cds-amal Mar 10, 2026
dfbba39
test: add golden files and UI test lists for nightly-2025-10-03
cds-amal Mar 10, 2026
7f87724
bump pinned nightly to 2025-10-03
cds-amal Mar 10, 2026
113681d
docs: update nightly compat guide for 11-breakpoint range
cds-amal Mar 10, 2026
f0ef2ad
feat(compat): handle StatementKind::Deinit removal (nightly-2025-10-12)
cds-amal Mar 10, 2026
0c4b181
test: add golden files and UI test lists for nightly-2025-10-12
cds-amal Mar 10, 2026
8b44cec
bump pinned nightly to 2025-10-12
cds-amal Mar 10, 2026
188401a
feat(compat): handle NullOp::OffsetOf removal and NullaryOp field cha…
cds-amal Mar 10, 2026
dba6117
test: add golden files and UI test lists for nightly-2025-11-19
cds-amal Mar 10, 2026
57b3497
bump pinned nightly to 2025-11-19
cds-amal Mar 10, 2026
fcfb836
feat(compat): handle ReifyFnPointer gaining Safety field (nightly-202…
cds-amal Mar 10, 2026
c010f03
test: add golden files and UI test lists for nightly-2025-12-06
cds-amal Mar 10, 2026
204429e
bump pinned nightly to 2025-12-06
cds-amal Mar 10, 2026
6f82dd2
fix(test): skip temporary-lifetime-extension.rs for nightly-2025-11-19+
cds-amal Mar 10, 2026
4b72cb2
fix(test): normalize v0-mangled crate hashes in integration golden files
cds-amal Mar 10, 2026
284ff1d
feat(compat): handle FileNameDisplayPreference becoming private (nigh…
cds-amal Mar 10, 2026
6ae10d5
test: add golden files and UI test lists for nightly-2025-12-14
cds-amal Mar 10, 2026
6573a6a
bump pinned nightly to 2025-12-14
cds-amal Mar 10, 2026
f3130a4
feat(compat): handle Rvalue::NullaryOp and NullOp removal (nightly-20…
cds-amal Mar 10, 2026
fae0505
test: add golden files and UI test lists for nightly-2025-12-23 and n…
cds-amal Mar 10, 2026
c240c48
bump pinned nightly to 2026-01-15
cds-amal Mar 10, 2026
a9ca4a3
fix(test): strip interned Span indices from golden file comparison
cds-amal Mar 10, 2026
3c27d5d
ci: add workflow to test all breakpoint nightlies
cds-amal Mar 10, 2026
567d246
fix(test): actually include del(.span) in normalise filter
cds-amal Mar 10, 2026
8fe42d3
fix(test): normalize interned Ty indices in Type and Array wrappers
cds-amal Mar 10, 2026
0f8f1b4
fix(test): normalize bare interned indices in Cast, Closure, VTable, …
cds-amal Mar 10, 2026
bacf164
docs(adr): interned index receipts for golden-file normalization
cds-amal Mar 10, 2026
a8c31ac
feat(printer): emit interned-index receipts alongside smir.json
cds-amal Mar 10, 2026
321c195
feat(test): receipt-driven normalise filter replaces hardcoded rules
cds-amal Mar 10, 2026
0791a5c
fix(receipts): remove VariantIdx from interned types and regenerate g…
cds-amal Mar 10, 2026
379b4a5
Cargo fmt
cds-amal Mar 10, 2026
1f3357a
ci: add UI tests to the all-nightlies matrix
cds-amal Mar 10, 2026
9e7bd1c
fix(ui): extend directive parser for subprocess, libc, and range edit…
cds-amal Mar 10, 2026
b48be72
fix(ui): use shared directive parser in remake/diff tools and regener…
cds-amal Mar 10, 2026
8fd6e99
fix(ui): add missing overrides for 07-05/07-08, restore 10-03, guard …
cds-amal Mar 10, 2026
7a33f18
fix(ui): make override generation platform-neutral with universal mode
cds-amal Mar 10, 2026
2931948
fix(ui): add manual overrides for 07-05/07-08 and fix RUN_SMIR librar…
cds-amal Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions .github/workflows/test-all-nightlies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: 'Test All Nightlies'

# Verifies that every breakpoint nightly (i.e., every nightly that has a
# golden-file directory under tests/integration/expected/) builds and passes
# integration and UI tests. This is the safety net that catches cfg-gating
# mistakes: a conditional match arm that compiles on the pinned nightly but
# not on an older (or newer) one in the supported range.
#
# Runs on:
# - Weekly (Sunday 04:00 UTC): keeps the matrix green even when the branch
# is quiet.
# - Manual dispatch: for ad-hoc verification after absorbing new breakpoints.
# - Push to master: ensures the supported range is intact on merge.

on:
schedule:
- cron: '0 4 * * 0' # every Sunday at 04:00 UTC
workflow_dispatch:
push:
branches: [master, cds/the-curious-case-of-stdlib]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
# ---------------------------------------------------------------------------
# Discover the nightly matrix dynamically from the golden-file directories.
# This means adding a new breakpoint nightly (with its golden files) is
# sufficient to include it in CI; no workflow file edits needed.
# ---------------------------------------------------------------------------
enumerate-nightlies:
name: 'Enumerate nightlies'
runs-on: [self-hosted, linux, normal]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- name: 'Build nightly matrix from golden-file directories'
id: set-matrix
run: |
set -euo pipefail
# Each directory name under tests/integration/expected/ is a nightly
# date string like "nightly-2025-07-15".
nightlies=$(
ls -1 tests/integration/expected/ \
| sort \
| jq -Rnc '[inputs | select(length > 0)]'
)
echo "matrix={\"nightly\":${nightlies}}" >> "$GITHUB_OUTPUT"
echo "Discovered nightlies: ${nightlies}"

# ---------------------------------------------------------------------------
# For each nightly: install the toolchain, build, run integration + UI tests.
# ---------------------------------------------------------------------------
test-nightly:
name: '${{ matrix.nightly }}'
needs: enumerate-nightlies
runs-on: [self-hosted, linux, normal]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.enumerate-nightlies.outputs.matrix) }}
steps:
- uses: actions/checkout@v4

- name: 'Install nightly toolchain'
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.nightly }}
components: rustc-dev,llvm-tools,rust-src

- name: 'Build stable-mir-json'
run: |
RUSTUP_TOOLCHAIN=${{ matrix.nightly }} cargo build -vv

- name: 'Install jq'
uses: dcarbone/install-jq-action@v3
with:
version: 1.7.1
force: true

- name: 'Run integration tests'
run: |
RUSTUP_TOOLCHAIN=${{ matrix.nightly }} make integration-test

- name: 'Derive rustc commit for UI tests'
id: rustc-meta
run: |
set -euo pipefail
COMMIT=$(RUSTUP_TOOLCHAIN=${{ matrix.nightly }} rustc -vV | grep 'commit-hash' | cut -d' ' -f2)
if [ -z "$COMMIT" ]; then
echo "::error::Could not determine rustc commit-hash for ${{ matrix.nightly }}"
exit 1
fi
echo "rustc-commit=$COMMIT" >> "$GITHUB_OUTPUT"

- name: 'Check out Rust repo'
uses: actions/checkout@v4
with:
repository: rust-lang/rust
ref: ${{ steps.rustc-meta.outputs.rustc-commit }}
path: rust
fetch-depth: 1

- name: 'Run UI tests'
run: |
RUSTUP_TOOLCHAIN=${{ matrix.nightly }} RUST_DIR_ROOT=rust make test-ui
75 changes: 63 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,31 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Install yq
run: |
set -euo pipefail
YQ_VERSION="v4.52.4"
mkdir -p "$HOME/.local/bin"
wget -qO "$HOME/.local/bin/yq" \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
chmod +x "$HOME/.local/bin/yq"
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: 'Read nightly channel from rust-toolchain.toml'
id: toolchain-meta
run: |
set -euo pipefail
CHANNEL=$(yq -r '.toolchain.channel' rust-toolchain.toml)
if [ -z "$CHANNEL" ] || [ "$CHANNEL" = "null" ]; then
echo "::error::Could not read toolchain.channel from rust-toolchain.toml"
exit 1
fi
echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"

- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs
toolchain: ${{ steps.toolchain-meta.outputs.channel }}

- name: 'Build stable-mir-json' # rustfmt documentation claims it is unstable on code that doesn't build
run: |
Expand Down Expand Up @@ -66,10 +87,31 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Install yq
run: |
set -euo pipefail
YQ_VERSION="v4.52.4"
mkdir -p "$HOME/.local/bin"
wget -qO "$HOME/.local/bin/yq" \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
chmod +x "$HOME/.local/bin/yq"
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: 'Read nightly channel from rust-toolchain.toml'
id: toolchain-meta
run: |
set -euo pipefail
CHANNEL=$(yq -r '.toolchain.channel' rust-toolchain.toml)
if [ -z "$CHANNEL" ] || [ "$CHANNEL" = "null" ]; then
echo "::error::Could not read toolchain.channel from rust-toolchain.toml"
exit 1
fi
echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"

- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs
toolchain: ${{ steps.toolchain-meta.outputs.channel }}

- name: 'Build stable-mir-json'
run: | # Warning check should be redundant since code-quality runs first
Expand Down Expand Up @@ -108,16 +150,30 @@ jobs:
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
chmod +x "$HOME/.local/bin/yq"
echo "$HOME/.local/bin" >> $GITHUB_PATH
yq --version

- name: 'Read nightly channel from rust-toolchain.toml'
id: toolchain-meta
run: |
set -euo pipefail
CHANNEL=$(yq -r '.toolchain.channel' rust-toolchain.toml)
if [ -z "$CHANNEL" ] || [ "$CHANNEL" = "null" ]; then
echo "::error::Could not read toolchain.channel from rust-toolchain.toml"
exit 1
fi
echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"

- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.toolchain-meta.outputs.channel }}

- name: 'Read rustc commit from rust-toolchain.toml'
- name: 'Derive rustc commit and check out Rust repo'
id: rustc-meta
run: |
set -euo pipefail
COMMIT=$(yq '.metadata.rustc-commit' rust-toolchain.toml)
if [ -z "$COMMIT" ] || [ "$COMMIT" = "null" ]; then
echo "::error::metadata.rustc-commit not found in rust-toolchain.toml"
COMMIT=$(rustc -vV | grep 'commit-hash' | cut -d' ' -f2)
if [ -z "$COMMIT" ]; then
echo "::error::Could not determine rustc commit-hash from 'rustc -vV'"
exit 1
fi
echo "rustc-commit=$COMMIT" >> "$GITHUB_OUTPUT"
Expand All @@ -130,11 +186,6 @@ jobs:
path: rust
fetch-depth: 1

- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs

- name: 'Build stable-mir-json'
run: | # Warning check should be redundant since code-quality runs first
RUSTFLAGS='--deny warnings' cargo build -vv
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
tests/ui/failing/*
tests/ui/passing/*
tests/ui/debug/*
tests/ui/debug/*
pr.md
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ retroactive best-effort summary; earlier changes were not formally tracked.
### Added
- `src/compat/` module isolating all rustc internal API usage behind a stable boundary; printer/ now has zero `extern crate rustc_*` declarations and zero direct `tcx.query()` calls
- `OpaqueInstanceKind` owned type replacing `middle::ty::InstanceKind<'tcx>`, eliminating the `'tcx` lifetime parameter from `SmirJson`, `LinkMapKey`, `FnSymInfo`, `LinkMap`, `DerivedInfo`, and `SmirJsonDebugInfo`
- `metadata.rustc-commit` field in `rust-toolchain.toml` as single source of truth for the rustc commit used by UI tests
- `ensure_rustc_commit.sh` helper that reads the expected commit from `rust-toolchain.toml` (via `yq`) and ensures the rust checkout (regular or bare+worktree) is at that commit; CI installs `yq` on PATH to support this
- `ensure_rustc_commit.sh` helper that derives the rustc commit from `rustc -vV` and ensures the rust checkout (regular or bare+worktree) is at that commit
- ADR-003 documenting compat layer design decisions and validation results from two toolchain bump stress tests (6-month and 13-month jumps)

### Changed
Expand Down
Loading
Loading