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

Consistent '--*-options' options #652

Open
borsboom opened this issue Jul 21, 2015 · 4 comments
Open

Consistent '--*-options' options #652

borsboom opened this issue Jul 21, 2015 · 4 comments

Comments

@borsboom
Copy link
Contributor

Currently there are a few different conventions in use for stack options that specify options to pass to external programs. These should be made consistent, preferably sharing an optparse-applicative Parser between them. I'm thinking they should all allow two different ways:

--*-option: pass a single argument, which may contain spaces.
--*-options: pass multiple space-separated arguments (parsed with argsParser)

It should be possible to pass both of these multiple times, in which case the options are concatenated in the order given.

In some cases, we also specify options in YAML configuration files. The configuration field should be named *-options, and should contain a YAML sequence. Sequences are concatenated when cascading configuration files (and any additional options from the command-line are concatenated after those from the configuration file).

(motivated by #601)

@DanBurton
Copy link
Contributor

+1 I generally agree with everything proposed here.

On Tuesday, July 21, 2015, Emanuel Borsboom notifications@github.com
wrote:

Currently there are a few different conventions in use for stack options
that specify options to pass to external programs. These should be made
consistent, preferably sharing an optparse-applicative between them. I'm
thinking they should all allow two different ways:

---option: pass a single argument, which may contain spaces.
--
-options: pass multiple space-separated arguments (parsed with
argsParser

argsParser :: EscapingMode -> Parser Text [String]

It should be possible to pass both of these multiple times, in which case
the options are concatenated in the order given.

In some cases, we also specify options in YAML configuration files. The
configuration field should be named *-options, and should contain a YAML
sequence. Sequences are concatenated when cascading configuration files
(and any additional options from the command-line are concatenated after
those from the configuration file).

(motivated by #601 #601
)


Reply to this email directly or view it on GitHub
#652.

-- Dan Burton

@mgsloan
Copy link
Contributor

mgsloan commented Feb 5, 2016

RyanGIScott just mentioned in #haskell-stack that he'd like a way to pass options to ghc-pkg, so we should be sure this covers that use case. It's to work around this issue gtk2hs/gtk2hs#139

@mgsloan
Copy link
Contributor

mgsloan commented Jul 19, 2016

Lets make sure this handles ghcjs-boot-options

@mpilgrem
Copy link
Member

mpilgrem commented Mar 3, 2024

With Stack 2.15.1, the state of affairs is:

  • build: --ghc-options
  • build: --PROG-option
  • build: --haddock-arguments
  • build: --ta, --test-arguments
  • build: --ba, --benchmark-arguments
  • docker run: --docker-run-args
  • --nix-shell-options

There is also:

  • hoogle: -- ARGUMENT(S)
  • ghc: -- ARGUMENT(S)
  • runghc: -- ARGUMENT(S)

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

4 participants