commercialhaskell / commercialhaskell/stack

Improve error message for multiple matching packages for "stack script"

Open
#3,823 1 comment 1 reaction 0 assignees View on GitHub
component: output (UI/UX) component: script interpreter newcomer friendly type: enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.