spago icon indicating copy to clipboard operation
spago copied to clipboard

Change wording of "Some of your project files import modules from packages that are not in the direct dependencies"

Open klntsky opened this issue 3 years ago • 2 comments

I tried to see which modules actually use on one of the dependencies in my spago.dhall. I removed it and tried to compile, hoping I'll get compile errors.

But instead I've got this message with recommendation to install the package again.

[error] Some of your project files import modules from packages that are not in the direct dependencies of your project.

I think it would be useful to support my use-case by including a list of modules that import modules from missing package in the error message.

klntsky avatar May 19 '22 13:05 klntsky

I believe this is already supported. Which version of spago are you using?

JordanMartinez avatar May 19 '22 16:05 JordanMartinez

@JordanMartinez at least in master spago lists package dependencies, not my project modules.

klntsky avatar May 20 '22 12:05 klntsky

The new Spago written in PureScript will list the modules that you are importing from the offending packages:

image

This should be enough to be able to search for these and see where they are imported.

f-f avatar Jan 20 '23 17:01 f-f

Well, it turns out that adding provenance makes the code easier to write and it's more informative:

image

f-f avatar Jan 22 '23 12:01 f-f

Leaving this open as a reminder that we should document the --pedantic-packages flag better.

f-f avatar Sep 20 '23 17:09 f-f

This is now fully shipped, closing

f-f avatar Sep 29 '23 21:09 f-f