Skip to content
New issue

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

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

Already on GitHub? # to your account

CLI mechanism for applying build flags to specific packages #2417

Open
mgsloan opened this issue Jul 27, 2016 · 1 comment
Open

CLI mechanism for applying build flags to specific packages #2417

mgsloan opened this issue Jul 27, 2016 · 1 comment

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Jul 27, 2016

For flags, in both stack.yaml and the CLI we specify them in a package-specific manner. However, for --ghc-options and other CLI flags, we specify something that applies to all. In the case of flags like --coverage, --profile, --haddock, etc, many packages may be rebuilt - see for example #1940 #1132 .

It would make sense to me if some subset of build flags could be specified per-package. One way to do this might be something like stack build target-pkg --opts "--coverage --haddock" other-pkg. --haddock and --coverage would only be applied to target-pkg.

This also suggests a potential alternative way of specifying ghc-options, flags, and other settings in stack.yaml. We might consider an alternative specification which is included in the packages member, and uses the same names as the top level settings.

@borsboom
Copy link
Contributor

borsboom commented Aug 7, 2016

I think there's overlap between this and #849 as well.

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

No branches or pull requests

2 participants