Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

situation with stack repl --package and multiple packages is unclear #5455

Closed
simonmichael opened this issue Dec 8, 2020 · 2 comments
Closed

Comments

@simonmichael
Copy link
Contributor

simonmichael commented Dec 8, 2020

stack repl --package's help suggests it can support multiple packages, but it gives an obscure error for the obvious syntaxes (comma or space-separated, as supported by stack script --package):

$ stack --version
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0
$ stack repl --help | grep '\--package'
                  [--with-ghc GHC] [--[no-]load] [--package PACKAGE(S)]
  --package PACKAGE(S)     Additional package(s) that must be installed
$ stack repl Shake.hs --package regex,shake
Error parsing targets: Directory not found: regex,shake
$ stack repl Shake.hs --package 'regex shake'
Error parsing targets: Directory not found: regex shake

PS I'm interested in this because specifying multiple packages without using a space seems possibly helpful in hie.yaml files.

@simonmichael simonmichael changed the title situation with stack repl --package & multiple packages is unclear situation with stack repl --package and multiple packages is unclear Dec 8, 2020
@qrilka
Copy link
Contributor

qrilka commented Dec 8, 2020

As far as I understand the way to use multiple package would be by repeating --package <package for every one of them, probably we should improve CLI help here.

@mpilgrem
Copy link
Member

I am closing because the current stack repl --help explains:

--package PACKAGE        Add a package (can be specified multiple times)

and that is consistent with Stack.Config.packagesParser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants