Skip to content

feat: use the bundled nanoda, and deprecate the nanoda input - #192

Open
kim-em wants to merge 6 commits into
feat/lake-checkfrom
feat/nanoda-bundled
Open

kim-em wants to merge 6 commits into
feat/lake-checkfrom
feat/nanoda-bundled

Conversation

@kim-em

@kim-em kim-em commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

This PR makes nanoda: true use the leanexport and nanoda_bin that recent release toolchains ship, instead of installing a Rust toolchain and building lean4export and nanoda_lib from source on every run. The bundled binaries are matched to each other and to the compiler that produced the .olean files, where the source path pinned nanoda_lib to a branch rather than a release. Toolchains that ship neither keep the existing path unchanged.

The permitted axioms are identical on both paths, so this changes what the step costs, not what it accepts.

It also deprecates nanoda and nanoda-allow-sorry in favour of lake-check: paranoid, which runs nanoda alongside every other bundled checker. One case has no migration, and the warning and the documentation say so rather than implying a clean swap: lake check permits only the standard axioms and cannot be told to tolerate sorryAx, so a project relying on nanoda-allow-sorry: true should stay on this input for now. lake check --allow-sorry would close that gap, and is worth requesting upstream.

Nothing here delegates nanoda to lake check. Doing so would widen the check from one kernel to five for someone who asked only for nanoda, and would change the axiom policy underneath projects that carry a sorry.

A functional test asserts both halves of the claim: that the check still passes on a toolchain bundling the binaries, and that no source build happened, since avoiding that is the point.

🤖 Prepared with Claude+Codex

Kim Morrison added 2 commits September 23, 2026 12:46
`nanoda: true` currently installs a Rust toolchain, clones and builds
`lean4export`, then clones and builds `nanoda_lib` from a branch rather than a
release, on every run. Recent release toolchains ship `leanexport` and
`nanoda_bin` already, matched to each other and to the compiler that produced
the oleans, so prefer those when they are present. Older toolchains keep the
source-build path unchanged.

The axioms permitted are the same either way, so this changes what the step
costs and not what it accepts.

Also deprecates `nanoda` and `nanoda-allow-sorry` in favour of
`lake-check: paranoid`, which runs nanoda alongside every other bundled
checker. The warning and the documentation are explicit that one case has no
migration: `lake check` permits only the standard axioms and cannot be told to
tolerate `sorryAx`, so a project that relies on `nanoda-allow-sorry: true`
should stay on this input for now.

The functional test asserts both that the check still passes on a toolchain
that bundles the binaries and that no source build happened, since the saving
is the point of the change.
`elan` sets the default toolchain without downloading it, so the precondition
step ran 40ms after `elan-init` and found no toolchain directory at all. Move
it after `lake update`, which is the first thing that actually uses the
toolchain.
Kim Morrison and others added 4 commits September 23, 2026 13:05
`lake init foo lib` on a current toolchain writes `name = "foo"` at the top
level of `lakefile.toml`, with no `[package]` section and a library called
`Foo`. Looking only for a package name therefore found nothing, and `nanoda`
failed with "Could not detect module name from lakefile.toml or lakefile.lean"
before it checked anything.

Prefer `defaultTargets`, then the first `lean_lib`, then the `[package]` name.
The first two name a module to export; a package name need not be one.
Resolve the CHANGELOG conflict with the SHA pinning of #193, and pin the checkout steps this PR adds to the same SHA.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The deprecation of `nanoda` points users at `lake-check: paranoid`, which #190 adds, so this PR now builds on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep this PR's CHANGELOG entries under Unreleased; the automatic merge
had placed them inside the already-released v1.6.1 section.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@austinletson
austinletson changed the base branch from main to feat/lake-check October 12, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant