commercialhaskell / commercialhaskell/stack

Consistent '--*-options' options

Open
#652 4 comments 0 reactions 0 assignees View on GitHub
awaiting pull request component: options parsing
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

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](https://github.com/commercialhaskell/stack/blob/e328d63042d5472a25741c6ad988f461d826e036/src/Data/Attoparsec/Args.hs#L38))

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)

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.