Skip to content

Make it easier to fix "direct dependencies" error message #776

@rintcius

Description

@rintcius

I was thinking that it could be handy if the list of packages that is shown for the following error would instead contain lines that can directly be copy-pasted into spago.dhall (rather than having to edit after paste) or, even better if spago would ask if it's ok to apply the necessary changes to spago.dhall

[error] Some of your project files import modules from packages that are not in the direct dependencies of your project.
To fix this error add the following packages to the list of dependencies in your config:
- package1
- package2
- etc

The following warning may also be incorporated in the suggestion, though this is less work to do manually:

[warn] None of your project files import modules from some projects that are in the direct dependencies of your project.
These dependencies are unused. To fix this warning, remove the following packages from the list of dependencies in your config:
- packageA
- packageB
- etc

A step further and not sure how easy this would be to implement, but it would be awesome if spago could also apply the addition of new dependencies in the same way (as long as it's in the package set). I.e. if it would recognise the package that needs to be added given a certain import that was just added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions