commercialhaskell / commercialhaskell/stack
Improve error message for multiple matching packages for "stack script"
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
Current error message if you run `stack script` on a file with `import Text.Mustache` is
```
Module Text.Mustache appears in multiple packages: mustache stache
Called from:
throwString (src/Stack/Script.hs:151:41 in stack-1.6.0-8X4wAceLUOM24tZpnp4UV1:Stack.Script)
```
Ideally this should give the following info:
* It should explain that it is figuring out packages to unhide based on parsing imports.
* The inferred `--package` arguments for the other packages. This way, if the user needs to switch to using `--package` arguments, they can just copy the ones that have been inferred and then add the disambiguating one.
Contributor guide
Assessment
This issue has not been assessed yet.