Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "missing packages" error message more descriptive #1290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Spago/Command/Fetch.purs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@ getTransitiveDepsFromPackageSet packageSet deps = do
when (not (Set.isEmpty errors.cycle)) do
die $ "The following packages have circular dependencies:\n" <> foldMap printPackageError (Set.toUnfoldable errors.cycle :: Array PackageName)
when (not (Set.isEmpty errors.notInPackageSet)) do
die $ "The following packages do not exist in your package set:\n" <> foldMap printNotInPackageSetError errors.notInPackageSet
die $ "The following packages do not exist in your package set:\n"
<> foldMap printNotInPackageSetError errors.notInPackageSet
<> "To list available packages use `spago ls packages`\n"
when (not (Set.isEmpty errors.notInIndex)) do
die $ "The following packages do not exist in the package index:\n" <> foldMap printPackageError errors.notInIndex
pure packages
Expand Down
1 change: 1 addition & 0 deletions test-fixtures/missing-dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Reading Spago workspace configuration...
- bar-bar-bar
- effcet (did you mean: effect)
- foo-foo-foo
To list available packages use `spago ls packages`