-
Notifications
You must be signed in to change notification settings - Fork 103
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
hpack all packages in a project with one invocation #347
Comments
How about |
Not eager to add |
One problem with that is that it'd not work if you're in a subdirectory. cabal-install and stack both go up the directory tree until they find a project description and then they'll do the right thing, but presumably |
@quasicomputational if a proper solution to this requires to be aware of |
I think that the best solution would be to be cabal.project aware. Using hpack on only and all the packages in cabal.project (or more ideally some way to specify which ones). Maybe a |
@quasicomputational did you do anything here? I would want to see a proof-of-concept of this in a separate project / executable. |
No, I never wound up writing anything to do this that would've been anywhere near suitable for general consumption - all entangled with other considerations. |
I use a fairly simple shake build script for generating cabal files in a project. It uses |
Currently, hpack is totally project-agnostic. If you're working in a project with multiple packages and you want to regenerate many or even all of the
.cabal
files, you have to invoke hpack for each package. For cabal-install projects, that can be quite the hardship; it's OK for stack because of the built-in hpack integration (i.e.,stack build
will regenerate the package descriptions for you).I think it'd be nice to have a hpack mode that'd re-run hpack for all the packages in the project. This would need a
--project-file
flag to point hpack at the.project
file, if it's in a non-standard place. There's also the problem thatcabal.project
files don't have a parser we can use. (I do have some code for this but it'd need some polishing before release.)The text was updated successfully, but these errors were encountered: