Add support for hpack (see #1679)#1773
Conversation
|
This adds minimal support for |
| => Path Abs Dir -- ^ package directory | ||
| -> m (Path Abs File) | ||
| getCabalFileName pkgDir = do | ||
| liftIO $ hpack pkgDir |
There was a problem hiding this comment.
@mgsloan I'm not sure if that is the best place to call this. Any feedback?
There was a problem hiding this comment.
I think this is the right place to call hpack, but this changes the meaning of getCabalFileName enough to warrant renaming it to findOrGenerateCabalFile. The new name isn't perfect (makes it sound like it'll always generate a cabal file if it's missing), however, this is better because it lets the reader know it may perform file system mutations (not merely a "get").
There was a problem hiding this comment.
Ok, makes sense. I'll change that some time soon (may have to wait until next weekend).
|
Awesome, thanks for working on this! Sorry for letting it languish, I got busy! In order for package dirtiness to work properly, we need to only write to the cabal file when the hpack file is changed. Maybe rely on modification timestamps and generate a new cabal file only when the hpack is changed? |
|
@mgsloan AFAIK |
stack.yaml
Outdated
| extra-deps: | ||
| - path-io-0.3.1 | ||
|
|
||
| packages: |
There was a problem hiding this comment.
similar change is needed for stack-7.8.yaml
|
@mgsloan @phadej Yes, exactly, |
|
Cool, once the updated |
f4143d8 to
671a547
Compare
|
@mgsloan I addressed all the open points and released a new version of |
|
LGTM, thanks! |
Add support for hpack (see #1679)
No description provided.