-
Notifications
You must be signed in to change notification settings - Fork 848
Add support for hpack (see #1679) #1773
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
Conversation
This adds minimal support for |
@@ -1062,6 +1064,7 @@ getCabalFileName | |||
=> Path Abs Dir -- ^ package directory | |||
-> m (Path Abs File) | |||
getCabalFileName pkgDir = do | |||
liftIO $ hpack pkgDir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgsloan I'm not sure if that is the best place to call this. Any feedback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -11,3 +11,10 @@ nix: | |||
- zlib | |||
extra-deps: | |||
- path-io-0.3.1 | |||
|
|||
packages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar change is needed for stack-7.8.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, noted.
@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.