Skip to content

Commit 63e9909

Browse files
committed
fix: restore #lint via Mathlib.Init (leanprover-community#33827)
This PR is intended as a quick fix to make `#lint` available in Mathlib once again after it was removed with the introduction of the new shake tool in leanprover-community#32731. (See relevant part of the diff [here](https://github.com/leanprover-community/mathlib4/pull/32731/changes#diff-58fcfeaf03590610a5fa5761814c31bca69c4dc9bfb2d97791579919cb880622L8-R10).) Future runs of `shake` should not require `-- shake: keep` after [batteries#1613](leanprover-community/batteries#1613); see also [Zulip](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/.23lint.20is.20broken/near/567348613). Following this, we should likely audit the import hierarchy below Mathlib.Init (and of other meta files) following leanprover-community#32731, and consider whether this is the right hierarchical structure. Possibly we should then add tests to ensure that everything we want to be available remains available at the right points.
1 parent d59d8f5 commit 63e9909

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Mathlib/Init.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public import Mathlib.Tactic.Linter.GlobalAttributeIn
1212
public import Mathlib.Tactic.Linter.HashCommandLinter
1313
public import Mathlib.Tactic.Linter.Header
1414
public import Mathlib.Tactic.Linter.FlexibleLinter
15-
-- This file imports Batteries.Tactic.Lint, where the `env_linter` attribute is defined.
15+
-- The following module imports `Batteries.Tactic.Lint`, where `#lint` is defined.
1616
public import Mathlib.Tactic.Linter.Lint
1717
public import Mathlib.Tactic.Linter.Multigoal
1818
public import Mathlib.Tactic.Linter.OldObtain

Mathlib/Tactic/Linter/Lint.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ Authors: Floris van Doorn
55
-/
66
module
77

8-
public import Batteries.Tactic.Lint.Basic
8+
-- This module imports all of `Batteries.Tactic.Lint`, not just `Batteries.Tactic.Lint.Basic`.
9+
-- It is responsible for making `#lint` available through `Mathlib.Init`.
10+
-- TODO: consider removing `-- shake: keep` after batteries#1613
11+
public import Batteries.Tactic.Lint -- shake: keep
912
public import Lean.Linter.Deprecated
1013
public import Mathlib.Tactic.DeclarationNames
1114

0 commit comments

Comments
 (0)