Skip to content

Commit 388fd59

Browse files
chore: bump to nightly-2026-04-01 (#821)
1 parent 865f7a2 commit 388fd59

15 files changed

Lines changed: 175 additions & 1059 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,14 @@ jobs:
403403
name: "html"
404404
path: "_out/"
405405

406-
- name: Install TypeScript
407-
run: |
408-
sudo apt update && sudo apt install node-typescript
406+
- uses: actions/setup-node@v4
407+
with:
408+
node-version: "lts/*"
409+
cache: npm
410+
411+
- run: npm ci
409412

410413
- name: Type check the search bar code
411414
run: |
412415
cd _out/html-multi/-verso-search
413-
tsc --noEmit -p jsconfig.json
416+
npx tsc --noEmit -p jsconfig.json

Manual/Axioms.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The existence of this function contradicts the “free theorem”:
9393
```lean
9494
theorem unit_not_nat : Unit ≠ Nat := by
9595
intro eq
96-
have ⟨allEq⟩ := eq ▸ inferInstanceAs (Subsingleton Unit)
96+
have ⟨allEq⟩ := eq ▸ (inferInstance : Subsingleton Unit)
9797
specialize allEq 0 1
9898
contradiction
9999

Manual/BasicTypes/Subtype.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def s2 : NonEmptyString where
7676
val := "equal"
7777
property :=
7878
fun h =>
79-
List.cons_ne_nil _ _ (String.data_eq_of_eq h)
79+
List.cons_ne_nil _ _ (String.ext_iff.mp h)
8080

8181
theorem s1_eq_s2 : s1 = s2 := by rfl
8282
```
@@ -98,7 +98,7 @@ def s2 : NonEmptyString where
9898
val := "equal"
9999
property :=
100100
fun h =>
101-
List.cons_ne_nil _ _ (String.data_eq_of_eq h)
101+
List.cons_ne_nil _ _ (String.ext_iff.mp h)
102102

103103
theorem s1_eq_s2 : s1 = s2 := by
104104
ext

Manual/BuildTools/Lake.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ module.input
375375
module.ir
376376
module.lean
377377
module.leanArts
378+
module.ltar
378379
module.o
379380
module.o.export
380381
module.o.noexport
@@ -477,6 +478,10 @@ The facets available for modules are:
477478

478479
A shared library (e.g., for the Lean option `--load-dynlib`){TODO}[Document Lean command line options, and cross-reference from here].
479480

481+
: `ltar`
482+
483+
A compressed archive (produced via `leantar`) of the module's build artifacts. {TODO}[Document `leantar` in the manual as well]
484+
480485
:::
481486

482487

Manual/BuildTools/Lake/CLI.lean

Lines changed: 79 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,11 @@ COMMANDS:
11171117
clean removes ALL froms the local Lake cache
11181118
services print configured remote cache services
11191119

1120+
STAGING COMMANDS:
1121+
stage <map> <dir> copy build outputs from the cache to a directory
1122+
unstage <dir> cache build outputs from a staging directory
1123+
put-staged <dir> upload build outputs from a staging directory
1124+
11201125
See `lake cache help <command>` for more information on a specific command.
11211126
```
11221127

@@ -1134,11 +1139,11 @@ OPTIONS:
11341139
--platform=<target-triple> with Reservoir or --repo, sets the platform
11351140
--toolchain=<name> with Reservoir or --repo, sets the toolchain
11361141
--scope=<remote-scope> scope for a custom endpoint
1137-
--download-arts download artifacts now, not on demand
1142+
--mappings-only only download mappings, delay artifacts
11381143
--force-download redownload existing files
11391144

11401145
Downloads build outputs for packages in the workspace from a remote cache
1141-
service. The cache service used can be specifed via the `--service` option.
1146+
service. The cache service used can be specified via the `--service` option.
11421147
Otherwise, Lake will the system default, or, if none is configured, Reservoir.
11431148
See `lake cache services` for more information on how to configure services.
11441149

@@ -1165,17 +1170,16 @@ artifacts. If no mappings are found, Lake will backtrack the Git history up to
11651170
`--max-revs`, looking for a revision with mappings. If `--max-revs` is 0, Lake
11661171
will search the repository's entire history (or as far as Git will allow).
11671172

1168-
With a named service and without a mappings file, Lake will only download
1169-
the input-to-output mappings for packages. It will delay downloading of the
1170-
corresponding artifacts to the next `lake build` that requires them. Using
1171-
`--download-arts` will force Lake to download all artifacts eagerly.
1173+
By default, Lake will download both the input-to-output mappings and the
1174+
output artifacts for a package. By using `--mappings-onlys`, Lake will only
1175+
download the mappings abd delay downloading artifacts until they are needed.
11721176

11731177
If a download for an artifact fails or the download process for a whole
11741178
package fails, Lake will report this and continue on to the next. Once done,
11751179
if any download failed, Lake will exit with a nonzero status code.
11761180
```
11771181

1178-
:::lake cache get "[mappings] [\"--max-revs=\" cn] [\"--rev=\" «commit-hash»] [\"--service=\" «name»] [\"--repo=\" «github-repo»] [\"--platform=\" «target-triple»] [\"--toolchain=\"«name»] [\"--scope=\" «remote-scope»] [\"--download-arts\"] [\"--force-download\"]"
1182+
:::lake cache get "[mappings] [\"--max-revs=\" cn] [\"--rev=\" «commit-hash»] [\"--service=\" «name»] [\"--repo=\" «github-repo»] [\"--platform=\" «target-triple»] [\"--toolchain=\"«name»] [\"--scope=\" «remote-scope»] [\"--mappings-only\"] [\"--force-download\"]"
11791183
Downloads build outputs for packages in the workspace from a remote cache service to the local Lake {tech (key:="local cache")}[artifact cache].
11801184
The cache service used can be specified via the {lakeOpt}`--service` option.
11811185
Otherwise, Lake will use the system default, or, if none is configured, Reservoir.
@@ -1195,9 +1199,8 @@ Lake will download the artifacts for the most recent commit with available mappi
11951199
It will backtrack up to {lakeOptDef option}`--max-revs`, which defaults to 100.
11961200
If set to 0, Lake will search the repository's whole history, or as far back as Git will allow.
11971201

1198-
With a named service and without a mappings file, Lake will only download the input-to-output mappings for packages.
1199-
It will delay downloading of the corresponding artifacts to the next `lake build` that requires them.
1200-
Using {lakeOptDef option}`--download-arts` will force Lake to download all artifacts eagerly.
1202+
By default, Lake will download both the input-to-output mappings and the output artifacts for packages.
1203+
Using {lakeOptDef option}`--mappings-only` will cause Lake to only download the mappings and delay downloading artifacts until they are needed.
12011204
Using {lakeOptDef option}`--force-download` will redownload existing files.
12021205

12031206
While downloading, Lake will continue on when a download for an artifact fails or if the download process for a whole package fails.
@@ -1213,7 +1216,7 @@ USAGE:
12131216

12141217
Uploads the input-to-output mappings contained in the specified file along
12151218
with the corresponding output artifacts to a remote cache. The cache service
1216-
used via be specified via `--service` option. If not specifed, Lake will used
1219+
used can be specified via the `--service` option. If not specified, Lake will use
12171220
the system default, or error if none is configured. See the help page of
12181221
`lake cache services` for more information on how to configure services.
12191222

@@ -1282,7 +1285,7 @@ As such, the command will warn if the work tree currently has changes.
12821285
::::
12831286

12841287
```lakeCacheHelp add
1285-
Addd input-to-output mappings to the Lake cache
1288+
Add input-to-output mappings to the Lake cache
12861289

12871290
USAGE:
12881291
lake cache add <mappings>
@@ -1377,6 +1380,70 @@ If no `cache.defaultService` is configured, Lake will use Reservoir by default.
13771380
:::
13781381
::::
13791382

1383+
```lakeCacheHelp stage
1384+
Copy build outputs from the cache to a staging directory
1385+
1386+
USAGE:
1387+
lake cache stage <mappings> <staging-directory>
1388+
1389+
Creates the staging directory and copies the mappings file to it. Then, it
1390+
copies all artifacts described within the mappings file from the cache to the
1391+
staging directory. Errors if any of the artifacts described cannot be found in
1392+
the cache.
1393+
```
1394+
1395+
::::lake cache stage "mappings «staging-directory»"
1396+
Creates {lakeMeta}`staging-directory` and copies the {lakeMeta}`mappings` file to it.
1397+
After this, it copies all artifacts described within the mappings file from the cache to the
1398+
staging directory.
1399+
It is an error if any of the artifacts described cannot be found in the cache.
1400+
::::
1401+
1402+
```lakeCacheHelp unstage
1403+
Cache build outputs from a staging directory
1404+
1405+
USAGE:
1406+
lake cache unstage <staging-directory>
1407+
1408+
Copies the mappings and artifacts stored in staging directory (e.g., via
1409+
`lake cache stage`) back into the cache.
1410+
1411+
Reads the mappings file located at `outputs.jsonl` within the staging
1412+
directory and writes the mappings to the Lake cache. Then, it copies the
1413+
described artifacts from the staging directory into the cache.
1414+
```
1415+
1416+
::::lake cache unstage "«staging-directory»"
1417+
1418+
Copies the mappings and artifacts stored in {lakeMeta}`staging-directory` (e.g., via {lake}`cache stage`) back into the cache.
1419+
1420+
Reads the mappings file located at `outputs.jsonl` within the staging
1421+
directory and writes the mappings to the Lake cache. Then, it copies the
1422+
described artifacts from the staging directory into the cache.
1423+
::::
1424+
1425+
1426+
```lakeCacheHelp "put-stage"
1427+
Manage the Lake cache
1428+
1429+
USAGE:
1430+
lake cache <COMMAND>
1431+
1432+
COMMANDS:
1433+
get [<mappings>] download build outputs into the local Lake cache
1434+
put <mappings> upload build ouptuts to a remote cache
1435+
add <mappings> add input-to-output mappings to the Lake cache
1436+
clean removes ALL froms the local Lake cache
1437+
services print configured remote cache services
1438+
1439+
STAGING COMMANDS:
1440+
stage <map> <dir> copy build outputs from the cache to a directory
1441+
unstage <dir> cache build outputs from a staging directory
1442+
put-staged <dir> upload build outputs from a staging directory
1443+
1444+
See `lake cache help <command>` for more information on a specific command.
1445+
```
1446+
13801447

13811448
# Configuration Files
13821449

Manual/BuildTools/Lake/Config.lean

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ name = "example-package"
161161
dynlibs := #[],
162162
plugins := #[] },
163163
bootstrap := false,
164-
manifestFile := none,
165164
extraDepTargets := #[],
166165
precompileModules := false,
167166
moreGlobalServerArgs := #[],
@@ -190,7 +189,8 @@ name = "example-package"
190189
enableArtifactCache? := none,
191190
restoreAllArtifacts? := none,
192191
libPrefixOnWindows := false,
193-
allowImportAll := false},
192+
allowImportAll := false,
193+
fixedToolchain := false},
194194
configFile := FilePath.mk "lakefile",
195195
relConfigFile := FilePath.mk "lakefile",
196196
relManifestFile := FilePath.mk "lake-manifest.json",
@@ -205,9 +205,7 @@ name = "example-package"
205205
postUpdateHooks := #[],
206206
buildArchive := ELIDED,
207207
testDriver := "",
208-
lintDriver := "",
209-
inputsRef? := none,
210-
outputsRef? := none}
208+
lintDriver := ""}
211209
```
212210
::::
213211
:::::
@@ -249,7 +247,6 @@ name = "Sorting"
249247
dynlibs := #[],
250248
plugins := #[] },
251249
bootstrap := false,
252-
manifestFile := none,
253250
extraDepTargets := #[],
254251
precompileModules := false,
255252
moreGlobalServerArgs := #[],
@@ -278,7 +275,8 @@ name = "Sorting"
278275
enableArtifactCache? := none,
279276
restoreAllArtifacts? := none,
280277
libPrefixOnWindows := false,
281-
allowImportAll := false},
278+
allowImportAll := false,
279+
fixedToolchain := false},
282280
configFile := FilePath.mk "lakefile",
283281
relConfigFile := FilePath.mk "lakefile",
284282
relManifestFile := FilePath.mk "lake-manifest.json",
@@ -365,9 +363,7 @@ name = "Sorting"
365363
postUpdateHooks := #[],
366364
buildArchive := ELIDED,
367365
testDriver := "",
368-
lintDriver := "",
369-
inputsRef? := none,
370-
outputsRef? := none}
366+
lintDriver := ""}
371367
```
372368
::::
373369
:::::

Manual/Meta/Monotonicity.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,13 @@ def mkMonotonicityLemmas : TermElabM Name := do
146146
pure .continue)
147147

148148
let hlCall ← withOptions (·.setBool `pp.tagAppFns true) do
149+
let sigCache ← IO.mkRef {}
149150
let ctxt := {
150151
ids := {},
151152
definitionsPossible := false,
152153
includeUnparsed := false,
153-
suppressNamespaces := []
154+
suppressNamespaces := [],
155+
sigCache
154156
}
155157
let fmt ← Lean.Widget.ppExprTagged call'
156158
(renderTagged none fmt : ReaderT SubVerso.Highlighting.Context _ _).run ctxt

Manual/RecursiveDefs/WF.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ The definition of {name}`WellFounded` builds on the notion of _accessible elemen
851851
The definition of division by iterated subtraction can be written explicitly using well-founded recursion.
852852
```lean
853853
noncomputable def div (n k : Nat) : Nat :=
854-
(inferInstanceAs (WellFoundedRelation Nat)).wf.fix
854+
(inferInstance : WellFoundedRelation Nat).wf.fix
855855
(fun n r =>
856856
if h : k = 0 then 0
857857
else if h : k > n then 0

0 commit comments

Comments
 (0)