Skip to content

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

@mgsloan

Description

@mgsloan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions