forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: reverse pkg/lib search & no exe roots in import (leanprover…
…#2937) Closes leanprover#2548. Later packages and libraries in the dependency tree are now preferred over earlier ones. That is, the later ones "shadow" the earlier ones. Such an ordering is more consistent with how declarations generally work in programming languages. This will break any package that relied on the previous ordering. Also includes a related fix to `findModule?` that mistakenly treated executable roots as importable.
- Loading branch information
Showing
11 changed files
with
51 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def main := IO.println "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def main := IO.println "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import Lake | ||
open Lake DSL | ||
|
||
package bar | ||
|
||
lean_lib X where | ||
package bar where | ||
moreLeanArgs := #["-DmaxHeartbeats=555000"] | ||
|
||
lean_lib X | ||
lean_exe Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def main := IO.println "bar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import Lake | ||
open Lake DSL | ||
|
||
package foo | ||
package foo where | ||
moreLeanArgs := #["-DmaxHeartbeats=555000"] | ||
|
||
lean_lib X where | ||
moreLeanArgs := #["-DmaxHeartbeats=111000"] | ||
lean_lib X | ||
lean_exe Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import Lake | ||
open Lake DSL | ||
|
||
package order | ||
package order where | ||
moreLeanArgs := #["-DmaxHeartbeats=666000"] | ||
|
||
lean_exe Y | ||
|
||
require foo from "foo" | ||
require bar from "bar" | ||
|
||
lean_lib A.B where | ||
moreLeanArgs := #["-DmaxHeartbeats=333000"] | ||
lean_lib A where | ||
moreLeanArgs := #["-DmaxHeartbeats=222000"] | ||
|
||
lean_lib A.B.C where | ||
moreLeanArgs := #["-DmaxHeartbeats=444000"] | ||
|
||
lean_lib A where | ||
moreLeanArgs := #["-DmaxHeartbeats=222000"] | ||
lean_lib A.B where | ||
moreLeanArgs := #["-DmaxHeartbeats=333000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters