-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the graph check not warning about undeclared cross-package import…
…s between local packages (#1198)
- Loading branch information
Showing
9 changed files
with
73 additions
and
5 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
25 changes: 25 additions & 0 deletions
25
test-fixtures/monorepo/pedantic-cross-package-imports/expected-stderr.txt
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,25 @@ | ||
Reading Spago workspace configuration... | ||
|
||
✅ Selecting 2 packages to build: | ||
pedantic-cross-package-imports | ||
subpackage | ||
|
||
Downloading dependencies... | ||
Building... | ||
Src Lib All | ||
Warnings 0 0 0 | ||
Errors 0 0 0 | ||
|
||
✅ Build succeeded. | ||
|
||
Looking for unused and undeclared transitive dependencies... | ||
|
||
❌ Found unused and/or undeclared transitive dependencies: | ||
|
||
Sources for package 'subpackage' import the following transitive dependencies - please add them to the project dependencies, or remove the imports: | ||
pedantic-cross-package-imports | ||
from `Sub.Module`, which imports: | ||
Main | ||
|
||
These errors can be fixed by running the below command(s): | ||
spago install -p subpackage pedantic-cross-package-imports |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/pedantic-cross-package-imports/spago.yaml
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,10 @@ | ||
package: | ||
name: pedantic-cross-package-imports | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude | ||
workspace: | ||
package_set: | ||
registry: 50.3.2 | ||
extra_packages: {} |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/pedantic-cross-package-imports/src/Main.purs
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,10 @@ | ||
module Main where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
|
||
main :: Effect Unit | ||
main = do | ||
log "🍝" |
5 changes: 5 additions & 0 deletions
5
test-fixtures/monorepo/pedantic-cross-package-imports/sub/spago.yaml
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,5 @@ | ||
package: | ||
name: subpackage | ||
dependencies: | ||
- effect | ||
- prelude |
8 changes: 8 additions & 0 deletions
8
test-fixtures/monorepo/pedantic-cross-package-imports/sub/src/Main.purs
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,8 @@ | ||
module Sub.Module where | ||
|
||
import Prelude | ||
import Main as M | ||
import Effect (Effect) | ||
|
||
main :: Effect Unit | ||
main = M.main |
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