Skip to content

feat: public imports for environment linters inside of lake lint in module system mode#13843

Open
wkrozowski wants to merge 1 commit into
leanprover:masterfrom
wkrozowski:wojciech/envLinterPublicImport
Open

feat: public imports for environment linters inside of lake lint in module system mode#13843
wkrozowski wants to merge 1 commit into
leanprover:masterfrom
wkrozowski:wojciech/envLinterPublicImport

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

@wkrozowski wkrozowski commented May 25, 2026

This PR makes lake lint --builtin-lint import module-system targets at the public (OLeanLevel.exported) level instead of private. Environment linters now lint the public surface of such modules, matching how downstream consumers see them. Non-module targets retain their previous behaviour (private level), and text-linter warnings recorded via lintLogExt are preserved across the level change because that extension stores uniform OLean entries.

The top-level module's .olean is peeked via findOLean + readModuleData to decide whether to use .exported or .private, mirroring processHeaderCore. A new tests/lake/tests/builtin-lint-module/ test exercises the new code path with a dummy env linter and verifies that text-linter warnings on both public and private definitions survive the level switch.

@wkrozowski wkrozowski requested a review from tydeu as a code owner May 25, 2026 17:13
@wkrozowski wkrozowski added changelog-lake Lake lake-ci Run all Lake tests labels May 25, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 25, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-05-25 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-05-25 18:12:41)

@github-actions github-actions Bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label May 25, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label May 25, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-lake Lake lake-ci Run all Lake tests mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants