Skip to content

Commit 1228f28

Browse files
Garmelongithub-actions[bot]david-christiansenjcreedcmudatokrat
authored
chore: bump toolchain to v4.31.0-rc1 (#857)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: David Thrane Christiansen <david@lean-fro.org> Co-authored-by: jcreedcmu <jcreed@gmail.com> Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk> Co-authored-by: Paul Reichert <6992158+datokrat@users.noreply.github.com> Co-authored-by: Sebastian Graf <sgraf1337@gmail.com> Co-authored-by: Robert J. Simmons <442315+robsimmons@users.noreply.github.com> Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com> Co-authored-by: Pim Otte <otte.pim@gmail.com> Co-authored-by: Phil Nguyen <pcn@cs.umd.edu> Co-authored-by: Violetta Sim <38787503+eyihluyc@users.noreply.github.com> Co-authored-by: Markus Himmel <markus@himmel-villmar.de> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com> Co-authored-by: euprunin <178733547+euprunin@users.noreply.github.com> Co-authored-by: u <u@h> Co-authored-by: Pablo Graubner <2234137+pgraubner@users.noreply.github.com> Co-authored-by: Anne C.A. Baanen <vierkantor@vierkantor.com> Co-authored-by: Marc Huisinga <mhuisi@protonmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de> Co-authored-by: jrr6 <7482866+jrr6@users.noreply.github.com> Co-authored-by: Leonardo de Moura <leomoura@amazon.com> Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch> Co-authored-by: Violetta Sim <38787503+viol37@users.noreply.github.com> Co-authored-by: Rob Simmons <rob@lean-fro.org> Co-authored-by: leanprover-bot <leanprover-bot@lean-fro.org> Co-authored-by: Kim Morrison <kim@tqft.net> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Wojciech Różowski <wojciech@lean-fro.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Richard Davison <richard.neil.davison@gmail.com> Co-authored-by: Chris Su <102528557+chrissuu@users.noreply.github.com> Co-authored-by: ericrbg-harmonic <eric@harmonic.fun> Co-authored-by: Mac Malone <tydeu@hatpress.net>
1 parent 1c87032 commit 1228f28

28 files changed

Lines changed: 1807 additions & 80 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install elan
3030
run: |
3131
set -o pipefail
32-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
32+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
3333
./elan-init -y --default-toolchain none
3434
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
3535

.github/workflows/discover-lean-pr-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install elan
3434
run: |
3535
set -o pipefail
36-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
36+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
3737
./elan-init -y --default-toolchain none
3838
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
3939

.github/workflows/merge-main-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install elan
3939
run: |
4040
set -o pipefail
41-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
41+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
4242
./elan-init -y --default-toolchain none
4343
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
4444

.github/workflows/pr-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install elan
1616
run: |
1717
set -o pipefail
18-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
18+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
1919
./elan-init -y --default-toolchain none
2020
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
2121

.github/workflows/release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Install elan
4444
run: |
4545
set -o pipefail
46-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
46+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
4747
./elan-init -y --default-toolchain none
4848
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
4949

.github/workflows/update-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Install elan
9797
run: |
9898
set -o pipefail
99-
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.1.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
99+
curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
100100
./elan-init -y --default-toolchain none
101101
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
102102

Manual/BasicTypes/UInt.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ This is not equivalent to C's `sizeof` operator, which instead determines how ma
198198
{docstring Int64.ofInt}
199199

200200

201-
{docstring ISize.ofIntTruncate}
201+
{docstring ISize.ofIntClamp}
202202

203-
{docstring Int8.ofIntTruncate}
203+
{docstring Int8.ofIntClamp}
204204

205-
{docstring Int16.ofIntTruncate}
205+
{docstring Int16.ofIntClamp}
206206

207-
{docstring Int32.ofIntTruncate}
207+
{docstring Int32.ofIntClamp}
208208

209-
{docstring Int64.ofIntTruncate}
209+
{docstring Int64.ofIntClamp}
210210

211211

212212
{docstring ISize.ofIntLE}
@@ -254,15 +254,15 @@ This is not equivalent to C's `sizeof` operator, which instead determines how ma
254254

255255
{docstring UInt64.ofNatLT}
256256

257-
{docstring USize.ofNatTruncate}
257+
{docstring USize.ofNatClamp}
258258

259-
{docstring UInt8.ofNatTruncate}
259+
{docstring UInt8.ofNatClamp}
260260

261-
{docstring UInt16.ofNatTruncate}
261+
{docstring UInt16.ofNatClamp}
262262

263-
{docstring UInt32.ofNatTruncate}
263+
{docstring UInt32.ofNatClamp}
264264

265-
{docstring UInt64.ofNatTruncate}
265+
{docstring UInt64.ofNatClamp}
266266

267267
{docstring USize.toNat}
268268

Manual/BuildTools/Elan.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ DISCUSSION:
390390
$ elan toolchain link master <path/to/lean/root>
391391
$ elan override set master
392392

393-
If you now compile a crate in the current directory, the custom
393+
If you now compile a package in the current directory, the custom
394394
toolchain 'master' will be used.
395395
```
396396

Manual/BuildTools/Lake/CLI.lean

Lines changed: 84 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ COMMANDS:
3838
check-build check if any default build targets are configured
3939
test test the package using the configured test driver
4040
check-test check if there is a properly configured test driver
41-
lint lint the package using the configured lint driver
41+
lint lint the package
4242
check-lint check if there is a properly configured lint driver
4343
clean remove build outputs
4444
shake minimize imports in source files
@@ -67,6 +67,7 @@ BASIC OPTIONS:
6767
--packages=file JSON file of package entries that override the manifest
6868
--reconfigure, -R elaborate configuration files instead of using OLeans
6969
--keep-toolchain do not update toolchain on workspace update
70+
--allow-empty accept bare builds with no default targets configured
7071
--no-build exit immediately if a build target is not up-to-date
7172
--no-cache build packages locally; do not download build caches
7273
--try-cache attempt to download build caches for supported packages
@@ -291,11 +292,14 @@ Single-character flags cannot be combined; `-HR` is not equivalent to `-H -R`.
291292

292293
: {lakeOptDef flag}`--rehash` or {lakeOptDef flag}`-H`
293294

294-
Ignored cached file hashes, recomputing them.
295+
Ignore cached file hashes, recomputing them.
295296
Lake uses hashes of dependencies to determine whether to rebuild an artifact.
296297
These hashes are cached on disk whenever a module is built.
297298
To save time during builds, these cached hashes are used instead of recomputing each hash unless {lakeOpt}`--rehash` is specified.
298299

300+
: {lakeOptDef flag}`--allow-empty`
301+
302+
Accept builds that produce no output when no {tech}[default targets] are configured.
299303

300304
: {lakeOptDef flag}`--update`
301305

@@ -844,29 +848,93 @@ A library test driver will just be built; it is expected that tests are implemen
844848
:::
845849

846850
```lakeHelp lint
847-
Lint the workspace's root package using its configured lint driver
851+
Lint the workspace's root package
848852

849853
USAGE:
850-
lake lint [-- <args>...]
854+
lake lint [OPTIONS] [<MODULE>...] [-- <args>...]
855+
856+
By default, runs the package's configured lint driver. If `builtinLint` is
857+
set to `true` in the package configuration, builtin lints also run.
858+
859+
Builtin linting (`--builtin-lint`, `--builtin-only`, `--extra`, `--lint-all`,
860+
`--lint-only`, or `builtinLint = true` in the package configuration) drives a
861+
build of the targeted modules with the requested linter options enabled.
862+
The lint driver path on its own does not trigger a build.
863+
864+
Positional `MODULE` arguments narrow only the builtin lints; if omitted,
865+
the workspace's default target roots are used. The lint driver is invoked
866+
with `lintDriverArgs` from the package config plus any arguments after
867+
`--`; the `MODULE` list is not passed to it.
868+
869+
OPTIONS:
870+
--builtin-lint run builtin environment and text linters
871+
--builtin-only run only builtin linters, skip the lint driver
872+
--extra run default builtin linters together with the
873+
non-default (extra) ones
874+
--lint-all run all registered linters, including defaults, extras,
875+
and any other disabled-by-default linters
876+
--lint-only <name> run only the specified linter (repeatable)
851877

852878
A lint driver can be configured by either setting the `lintDriver` package
853-
configuration option by tagging a script or executable `@[lint_driver]`.
854-
A definition in dependency can be used as a test driver by using the
855-
`<pkg>/<name>` syntax for the 'testDriver' configuration option.
879+
configuration option or by tagging a script or executable `@[lint_driver]`.
880+
A definition in a dependency can be used as a lint driver by using the
881+
`<pkg>/<name>` syntax for the 'lintDriver' configuration option.
856882

857-
A script lint driver will be run with the package configuration's
883+
A script lint driver will be run with the package configuration's
858884
`lintDriverArgs` plus the CLI `args`. An executable lint driver will be
859885
built and then run like a script.
860886

861887
```
862888

863-
:::lake lint " [\"--\" args...]"
889+
:::lake lint "[options...] [module...] [\"--\" args...]"
864890

865-
Lint the workspace's root package using its configured lint driver
891+
By default, lint the workspace's root package using its configured lint driver.
892+
If `builtinLint` is set to {name}`true` in the package configuration, builtin lints also run.
893+
894+
Positional {lakeMeta}`module` arguments narrow only the builtin lints; if omitted,
895+
the workspace's default target roots are used. The lint driver is invoked
896+
with `lintDriverArgs` from the package config plus any arguments after
897+
`--`; the {lakeMeta}`module` list is not passed to it.
866898

867899
A script lint driver will be run with the package configuration's
868900
`lintDriverArgs` plus the CLI `args`. An executable lint driver will be
869901
built and then run like a script.
902+
903+
The builtin linters are a set of linters that can run as part of a build. Some of them are run by default; these linters are run when `--builtin-lint` is specified. Other linters are extra linters; these linters are run only when `--extra` is specified.
904+
905+
The {lakeMeta}`options` may be:
906+
907+
: `--builtin-lint`
908+
909+
Run default builtin environment and text linters
910+
911+
: `--builtin-only`
912+
913+
Run only default builtin linters, skip the lint driver
914+
915+
: `--extra`
916+
917+
Run only non-default (extra) builtin linters
918+
919+
: `--lint-all`
920+
921+
Run all registered linters, including defaults, extra,
922+
and any other disabled-by-default linters
923+
924+
: `--lint-only` `<name>`
925+
926+
Run only the specified linter (repeatable).
927+
928+
929+
930+
A lint driver can be configured by either setting the `lintDriver` package
931+
configuration option or by tagging a script or executable `@[lint_driver]`.
932+
A definition in a dependency can be used as a lint driver by using the
933+
`<pkg>/<name>` syntax for the 'lintDriver' configuration option.
934+
935+
A script lint driver will be run with the package configuration's
936+
`lintDriverArgs` plus the CLI `args`. An executable lint driver will be
937+
built and then run like a script.
870938
:::
871939

872940
```lakeHelp "check-test"
@@ -1114,9 +1182,9 @@ USAGE:
11141182

11151183
COMMANDS:
11161184
get [<mappings>] download build outputs into the local Lake cache
1117-
put <mappings> upload build ouptuts to a remote cache
1185+
put <mappings> upload build outputs to a remote cache
11181186
add <mappings> add input-to-output mappings to the Lake cache
1119-
clean removes ALL froms the local Lake cache
1187+
clean removes ALL from the local Lake cache
11201188
services print configured remote cache services
11211189

11221190
STAGING COMMANDS:
@@ -1174,7 +1242,7 @@ will search the repository's entire history (or as far as Git will allow).
11741242

11751243
By default, Lake will download both the input-to-output mappings and the
11761244
output artifacts for a package. By using `--mappings-onlys`, Lake will only
1177-
download the mappings abd delay downloading artifacts until they are needed.
1245+
download the mappings and delay downloading artifacts until they are needed.
11781246

11791247
If a download for an artifact fails or the download process for a whole
11801248
package fails, Lake will report this and continue on to the next. Once done,
@@ -1297,7 +1365,7 @@ OPTIONS:
12971365
--scope=<remote-scope> the prefix of artifacts within the service
12981366
--repo=<github-repo> for Reservoir, a GitHub repository scope
12991367

1300-
Reads a list of input-to-output mapppings from the provided file and adds
1368+
Reads a list of input-to-output mappings from the provided file and adds
13011369
them to the local Lake cache. If `--service` is provided, the output artifacts
13021370
can then be fetched lazily from that service during a Lake build. The service
13031371
must either be `reservoir` or be configured through the Lake system
@@ -1433,9 +1501,9 @@ USAGE:
14331501

14341502
COMMANDS:
14351503
get [<mappings>] download build outputs into the local Lake cache
1436-
put <mappings> upload build ouptuts to a remote cache
1504+
put <mappings> upload build outputs to a remote cache
14371505
add <mappings> add input-to-output mappings to the Lake cache
1438-
clean removes ALL froms the local Lake cache
1506+
clean removes ALL from the local Lake cache
14391507
services print configured remote cache services
14401508

14411509
STAGING COMMANDS:

Manual/BuildTools/Lake/Config.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,15 @@ name = "example-package"
190190
restoreAllArtifacts? := none,
191191
libPrefixOnWindows := false,
192192
allowImportAll := false,
193+
builtinLint? := none,
193194
fixedToolchain := false},
194195
configFile := FilePath.mk "lakefile",
195196
relConfigFile := FilePath.mk "lakefile",
196197
relManifestFile := FilePath.mk "lake-manifest.json",
197198
scope := "",
198199
remoteUrl := "",
199200
depConfigs := #[],
201+
depPkgs := #[],
200202
targetDecls := #[],
201203
targetDeclMap := {},
202204
defaultTargets := #[],
@@ -276,13 +278,15 @@ name = "Sorting"
276278
restoreAllArtifacts? := none,
277279
libPrefixOnWindows := false,
278280
allowImportAll := false,
281+
builtinLint? := none,
279282
fixedToolchain := false},
280283
configFile := FilePath.mk "lakefile",
281284
relConfigFile := FilePath.mk "lakefile",
282285
relManifestFile := FilePath.mk "lake-manifest.json",
283286
scope := "",
284287
remoteUrl := "",
285288
depConfigs := #[],
289+
depPkgs := #[],
286290
targetDecls :=
287291
#[{toConfigDecl :=
288292
{pkg := `«example-package»,

0 commit comments

Comments
 (0)