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

Allow specifying local cabal options #129

Closed
RyanGlScott opened this issue Jan 16, 2018 · 5 comments
Closed

Allow specifying local cabal options #129

RyanGlScott opened this issue Jan 16, 2018 · 5 comments

Comments

@RyanGlScott
Copy link
Contributor

Just as there is currently a --local-ghc-options flag for adding ghc-options to the autogenerated cabal.project file, it would be convenient to have something similar for flags. I currently have to add this by hand to free's .travis.yml, for instance:

https://github.com/ekmett/free/blob/26b5a9b947969ff85e419443ae11e26319693a00/.travis.yml#L106-L108

@RyanGlScott
Copy link
Contributor Author

Or perhaps we need a more general mechanism for adding stanzas to a package field in the auto-generated cabal.project file. (For instance, I just found myself needing to generate library-coverage: true.)

@RyanGlScott
Copy link
Contributor Author

I think what might be nicer is to allow users to write stub files (lousy name proposal: cabal.project.stub) with contents like:

package my-package
  library-coverage: true

And have haskell-ci append that to the end of its auto-generated cabal.project files. This way, we wouldn't need an abundance of flags to support every possible Cabal flag.

@RyanGlScott
Copy link
Contributor Author

#157 added constraint sets via .haskell-ci files. However, it's unclear to me what the relationship between that and this idea is (for instance, I'm not sure if I can use constraint sets to achieve what I want here).

@RyanGlScott RyanGlScott changed the title Add --local-flags Allow specifying local cabal options May 24, 2018
@phadej phadej self-assigned this Jul 4, 2018
@phadej
Copy link
Collaborator

phadej commented Feb 11, 2019

This will be resolved once next Cabal version is released. Hopefully soon.

@RyanGlScott
Copy link
Contributor Author

This was addressed in #129 with the addition of raw-project stanzas, which let you do things like this:

raw-project
  package my-package
    library-coverage: true

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

2 participants