Skip to content

Commit 20affc9

Browse files
committed
Merge branch 'main' into charlie/metaclass
* main: (35 commits) Store definition indexes as u32 (#24307) Avoid re-using symbol in RUF024 fix (#24316) [ty] Add materialization to `Divergent` type (#24255) [ty] Make `Divergent` a top-level type variant (#24252) [ty] Fix nested global and nonlocal lookups through forwarding scopes (#24279) Fetch the cargo-dist binary directly instead of using the installer (#24258) [ty] Fix panic on `list[Annotated[()]]` (#24303) Don't measure the AST deallocation time in parser benchmarks (#24301) Enable CodSpeed's memory benchmarks for simulation benchmarks (#24298) Upgrade imara-diff to 0.2.0 (#24299) [ty] Represent `InitVar` as a special form internally, not a class (#24248) `RUF067`: Allow dunder-named assignments in non-strict mode [`pyupgrade`] UP018 should detect more unnecessarily wrapped literals (UP018) (#24093) [ty] Remove unused `system.glob` method (#24300) [ty] Reject functional TypedDict with mismatched name (#24295) Update Rust crate arc-swap to v1.9.0 (#24292) [ty] Remove unused `@Todo(Functional TypedDicts)` (#24297) Update CodSpeedHQ/action action to v4.12.1 (#24290) Update taiki-e/install-action action to v2.69.6 (#24293) Update Rust crate toml to v1.0.7 (#24289) ...
2 parents 52ba6d3 + 4338fb7 commit 20affc9

124 files changed

Lines changed: 4319 additions & 1932 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yaml

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,17 @@ jobs:
281281
- name: "Install mold"
282282
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
283283
- name: "Install cargo nextest"
284-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
284+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
285285
with:
286286
tool: cargo-nextest
287287
- name: "Install cargo insta"
288-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
288+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
289289
with:
290290
tool: cargo-insta
291291
- name: "Install uv"
292-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
292+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
293293
with:
294-
version: "0.10.12"
294+
version: "0.11.2"
295295
enable-cache: "true"
296296
- name: ty mdtests (GitHub annotations)
297297
if: ${{ needs.determine_changes.outputs.ty == 'true' }}
@@ -344,13 +344,13 @@ jobs:
344344
- name: "Install mold"
345345
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
346346
- name: "Install cargo nextest"
347-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
347+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
348348
with:
349349
tool: cargo-nextest
350350
- name: "Install uv"
351-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
351+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
352352
with:
353-
version: "0.10.12"
353+
version: "0.11.2"
354354
enable-cache: "true"
355355
- name: "Run tests"
356356
run: cargo nextest run --cargo-profile profiling --all-features
@@ -378,13 +378,13 @@ jobs:
378378
- name: "Install Rust toolchain"
379379
run: rustup show
380380
- name: "Install cargo nextest"
381-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
381+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
382382
with:
383383
tool: cargo-nextest
384384
- name: "Install uv"
385-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
385+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
386386
with:
387-
version: "0.10.12"
387+
version: "0.11.2"
388388
enable-cache: "true"
389389
- name: "Run tests"
390390
run: |
@@ -471,7 +471,7 @@ jobs:
471471
- name: "Install mold"
472472
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
473473
- name: "Install cargo-binstall"
474-
uses: cargo-bins/cargo-binstall@1800853f2578f8c34492ec76154caef8e163fbca # v1.17.7
474+
uses: cargo-bins/cargo-binstall@113a77a4ce971c41332f2129c3d995df993cf746 # v1.17.8
475475
- name: "Install cargo-fuzz"
476476
# Download the latest version from quick install and not the github releases because github releases only has MUSL targets.
477477
run: cargo binstall cargo-fuzz --force --disable-strategies crate-meta-data --no-confirm
@@ -489,9 +489,9 @@ jobs:
489489
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
490490
with:
491491
persist-credentials: false
492-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
492+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
493493
with:
494-
version: "0.10.12"
494+
version: "0.11.2"
495495
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
496496
with:
497497
shared-key: ruff-linux-debug
@@ -526,9 +526,9 @@ jobs:
526526
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
527527
with:
528528
save-if: ${{ github.ref == 'refs/heads/main' }}
529-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
529+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
530530
with:
531-
version: "0.10.12"
531+
version: "0.11.2"
532532
- name: "Install Rust toolchain"
533533
run: rustup component add rustfmt
534534
# Run all code generation scripts, and verify that the current output is
@@ -568,11 +568,11 @@ jobs:
568568
ref: ${{ github.event.pull_request.base.ref }}
569569
persist-credentials: false
570570

571-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
571+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
572572
with:
573573
python-version: ${{ env.PYTHON_VERSION }}
574574
activate-environment: true
575-
version: "0.10.12"
575+
version: "0.11.2"
576576

577577
- name: "Install Rust toolchain"
578578
run: rustup show
@@ -682,9 +682,9 @@ jobs:
682682
with:
683683
fetch-depth: 0
684684
persist-credentials: false
685-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
685+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
686686
with:
687-
version: "0.10.12"
687+
version: "0.11.2"
688688
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
689689
with:
690690
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -730,9 +730,9 @@ jobs:
730730
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
731731
with:
732732
persist-credentials: false
733-
- uses: cargo-bins/cargo-binstall@1800853f2578f8c34492ec76154caef8e163fbca # v1.17.7
733+
- uses: cargo-bins/cargo-binstall@113a77a4ce971c41332f2129c3d995df993cf746 # v1.17.8
734734
- run: cargo binstall --no-confirm cargo-shear
735-
- run: cargo shear
735+
- run: cargo shear --deny-warnings
736736

737737
ty-completion-evaluation:
738738
name: "ty completion evaluation"
@@ -743,9 +743,9 @@ jobs:
743743
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
744744
with:
745745
persist-credentials: false
746-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
746+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
747747
with:
748-
version: "0.10.12"
748+
version: "0.11.2"
749749
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
750750
with:
751751
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -796,14 +796,14 @@ jobs:
796796
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
797797
with:
798798
persist-credentials: false
799-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
799+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
800800
with:
801-
version: "0.10.12"
801+
version: "0.11.2"
802802
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
803803
with:
804804
node-version: 24
805805
- name: "Cache prek"
806-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
806+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
807807
with:
808808
path: ~/.cache/prek
809809
key: prek-${{ hashFiles('.pre-commit-config.yaml') }}
@@ -832,11 +832,11 @@ jobs:
832832
- name: "Install Rust toolchain"
833833
run: rustup show
834834
- name: Install uv
835-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
835+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
836836
with:
837837
python-version: 3.13
838838
activate-environment: true
839-
version: "0.10.12"
839+
version: "0.11.2"
840840
- name: "Install dependencies"
841841
run: uv pip install -r docs/requirements.txt
842842
- name: "Update README File"
@@ -985,25 +985,25 @@ jobs:
985985
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
986986
with:
987987
save-if: ${{ github.ref == 'refs/heads/main' }}
988-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
988+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
989989
with:
990-
version: "0.10.12"
990+
version: "0.11.2"
991991

992992
- name: "Install Rust toolchain"
993993
run: rustup show
994994

995995
- name: "Install codspeed"
996-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
996+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
997997
with:
998998
tool: cargo-codspeed
999999

10001000
- name: "Build benchmarks"
1001-
run: cargo codspeed build --features "codspeed,ruff_instrumented" --profile profiling --no-default-features -p ruff_benchmark --bench formatter --bench lexer --bench linter --bench parser
1001+
run: cargo codspeed build -m simulation -m memory --features "codspeed,ruff_instrumented" --profile profiling --no-default-features -p ruff_benchmark --bench formatter --bench lexer --bench linter --bench parser
10021002

10031003
- name: "Run benchmarks"
1004-
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # v4.11.1
1004+
uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
10051005
with:
1006-
mode: simulation
1006+
mode: "simulation,memory"
10071007
run: cargo codspeed run
10081008

10091009
benchmarks-instrumented-ty-build:
@@ -1032,12 +1032,12 @@ jobs:
10321032
run: rustup show
10331033

10341034
- name: "Install codspeed"
1035-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
1035+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
10361036
with:
10371037
tool: cargo-codspeed
10381038

10391039
- name: "Build benchmarks"
1040-
run: cargo codspeed build -m instrumentation --features "codspeed,ty_instrumented" --profile profiling --no-default-features -p ruff_benchmark --bench ty
1040+
run: cargo codspeed build -m simulation -m memory --features "codspeed,ty_instrumented" --profile profiling --no-default-features -p ruff_benchmark --bench ty
10411041

10421042
- name: "Upload benchmark binary"
10431043
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
@@ -1048,7 +1048,7 @@ jobs:
10481048
retention-days: 1
10491049

10501050
benchmarks-instrumented-ty-run:
1051-
name: "benchmarks instrumented ty (${{ matrix.benchmark }})"
1051+
name: "benchmarks instrumented ty (${{matrix.mode}}: ${{ matrix.benchmark }})"
10521052
runs-on: ubuntu-24.04
10531053
needs: benchmarks-instrumented-ty-build
10541054
timeout-minutes: 20
@@ -1061,17 +1061,20 @@ jobs:
10611061
benchmark:
10621062
- "check_file|micro|anyio"
10631063
- "attrs|hydra|datetype"
1064+
mode:
1065+
- simulation
1066+
- memory
10641067
steps:
10651068
- name: "Checkout Branch"
10661069
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
10671070
with:
10681071
persist-credentials: false
1069-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
1072+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
10701073
with:
1071-
version: "0.10.12"
1074+
version: "0.11.2"
10721075

10731076
- name: "Install codspeed"
1074-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
1077+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
10751078
with:
10761079
tool: cargo-codspeed
10771080

@@ -1086,9 +1089,9 @@ jobs:
10861089
run: find target/codspeed -type f -exec chmod +x {} +
10871090

10881091
- name: "Run benchmarks"
1089-
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # v4.11.1
1092+
uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
10901093
with:
1091-
mode: simulation
1094+
mode: ${{ matrix.mode }}
10921095
run: cargo codspeed run --bench ty "${{ matrix.benchmark }}"
10931096

10941097
benchmarks-walltime-build:
@@ -1117,15 +1120,15 @@ jobs:
11171120
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
11181121
with:
11191122
save-if: ${{ github.ref == 'refs/heads/main' }}
1120-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
1123+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
11211124
with:
1122-
version: "0.10.12"
1125+
version: "0.11.2"
11231126

11241127
- name: "Install Rust toolchain"
11251128
run: rustup show
11261129

11271130
- name: "Install codspeed"
1128-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
1131+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
11291132
with:
11301133
tool: cargo-codspeed
11311134

@@ -1161,12 +1164,12 @@ jobs:
11611164
with:
11621165
persist-credentials: false
11631166

1164-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
1167+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
11651168
with:
1166-
version: "0.10.12"
1169+
version: "0.11.2"
11671170

11681171
- name: "Install codspeed"
1169-
uses: taiki-e/install-action@cbb1dcaa26e1459e2876c39f61c1e22a1258aac5 # v2.68.33
1172+
uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
11701173
with:
11711174
tool: cargo-codspeed
11721175

@@ -1181,7 +1184,7 @@ jobs:
11811184
run: find target/codspeed -type f -exec chmod +x {} +
11821185

11831186
- name: "Run benchmarks"
1184-
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # v4.11.1
1187+
uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
11851188
env:
11861189
# enabling walltime flamegraphs adds ~6 minutes to the CI time, and they don't
11871190
# appear to provide much useful insight for our walltime benchmarks right now

.github/workflows/daily_fuzz.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3535
with:
3636
persist-credentials: false
37-
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
37+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3838
with:
39-
version: "0.10.12"
39+
version: "0.11.2"
4040
- name: "Install Rust toolchain"
4141
run: rustup show
4242
- name: "Install mold"

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
id-token: write
2323
steps:
2424
- name: "Install uv"
25-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
25+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2626
with:
27-
version: "0.10.12"
27+
version: "0.11.2"
2828
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
2929
with:
3030
pattern: wheels-*

.github/workflows/publish-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: git clone https://${{ secrets.ASTRAL_VERSIONS_PAT }}@github.com/astral-sh/versions.git astral-versions
3232

3333
- name: "Install uv"
34-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
34+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3535

3636
- name: "Update versions"
3737
env:

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ on:
4848
default: dry-run
4949
type: string
5050

51+
env:
52+
CARGO_DIST_VERSION: "0.31.0"
53+
CARGO_DIST_CHECKSUM: "cd355dab0b4c02fb59038fef87655550021d07f45f1d82f947a34ef98560abb8"
54+
5155
jobs:
5256
# Run 'dist plan' (or host) to determine what tasks we need to do
5357
plan:
@@ -65,10 +69,12 @@ jobs:
6569
persist-credentials: false
6670
submodules: recursive
6771
- name: Install dist
68-
# we specify bash to get pipefail; it guards against the `curl` command
69-
# failing. otherwise `sh` won't catch that `curl` returned non-0
7072
shell: bash
71-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0/cargo-dist-installer.sh | sh"
73+
run: |
74+
curl --proto '=https' --tlsv1.2 -LsSf "https://github.com/axodotdev/cargo-dist/releases/download/v${CARGO_DIST_VERSION}/cargo-dist-x86_64-unknown-linux-gnu.tar.xz" -o /tmp/cargo-dist.tar.xz
75+
echo "${CARGO_DIST_CHECKSUM} /tmp/cargo-dist.tar.xz" | sha256sum -c -
76+
tar -xf /tmp/cargo-dist.tar.xz -C /tmp
77+
install /tmp/cargo-dist-x86_64-unknown-linux-gnu/dist ~/.cargo/bin/
7278
- name: Cache dist
7379
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
7480
with:

0 commit comments

Comments
 (0)