-
Notifications
You must be signed in to change notification settings - Fork 32
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
Full Nix and project infrastructure rework #196
Conversation
59f59b9
to
b448087
Compare
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.
Very nice work! 🎉
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.
Thanks for preparing this, @sir4ur0n - I know it was a lot of work! The changes here make sense to me and really do improve the experience of working on the project. HLS integration works way better and is much faster than it previously was. The only thing which would be nice in the future is breaking out the global formatting run into a separate PR to make the changes more readable. LGTM though - please feel free to squash and merge 🙂
* Build now relies on Stack both for developers and CI (previous `haskell.nix` infrastructure meant developers used Stack and CI used `haskell.nix`, and `haskell.nix` provides poor developer experience with Stack, see [their documentation](https://input-output-hk.github.io/haskell.nix/tutorials/development/) for more information) * Removing `haskell.nix` also means removing the sluggishness caused by immaterializations, so shells should be faster * Stack integration should be **much better** now: commands like `stack build`, `stack test`, `stack repl funflow`, `stack haddock`, `stack ide targets`, etc., **just work** * Haskell Language Server integration should be **much better** now: I removed `hie.yaml` as the project is now a standard Stack project, which HLS (via hie-bios) auto detects correctly * E.g. code completion, documentation display, navigation, typechecking, work in all libraries, including in tests! * I copied and homogenized `LICENSE` files in each package * Some packages had a `package.yaml` (i.e. Hpack), some directly had a `xx.cabal` file (i.e. Cabal), so I homogenized to a `package.yaml` for each package, and I also versioned all generated cabal files (it's the recommended way) * `cas-store` gave me a hard time because there is some OS-specific logic which I had to translate to Hpack, but I think I somehow managed * I updated the Stackage resolver from 16.16 to 18.13. * Many dependencies are thus more up to date * GHC version thus bumped from 8.8.4 to 8.10.7 * I also updated the extra-dependencies, in particular `hvega` and `IHaskell` * A few dependencies no longer need specific pinning (e.g. `sqlite-simple`) * A few minor code changes were required (e.g. add `File` to imports of `Path` in various Haskell files and notebooks, e.g. `funflow/test/flows/TestFunflow.hs`) * Nix dependencies are now managed by Niv * It makes updating them easier * I have pushed `jupyterWith` dependency which was hardcoded to Niv depency too * Reworked the documentation according to all other changes * Documented use of Direnv to improve Shell integration with Nix * Fix broken Haddock for `funflow-examples/makefile-tool/src/Types.hs` * Reformat all Nix files
1308133
to
bec49b8
Compare
I have reworked the commit tree, now there are 2 commits:
|
So this ends up being a HUGE PR, sorry about that, it's never convenient when exploring infrastructure rework 🙇
Hopefully exhaustive list of changes or impacts of this PR:
haskell.nix
infrastructure meant developers used Stack and CI usedhaskell.nix
, andhaskell.nix
provides poor developer experience with Stack, see their documentation for more information)haskell.nix
also means removing the sluggishness caused by immaterializations, so shells should be fasterstack build
,stack test
,stack repl funflow
,stack haddock
,stack ide targets
, etc., just workhie.yaml
as the project is now a standard Stack project, which HLS (via hie-bios) auto detects correctlyLICENSE
files in each packagepackage.yaml
(i.e. Hpack), some directly had axx.cabal
file (i.e. Cabal), so I homogenized to apackage.yaml
for each package, and I also versioned all generated cabal files (it's the recommended way)cas-store
gave me a hard time because there is some OS-specific logic which I had to translate to Hpack, but I think I somehow managedhvega
andIHaskell
sqlite-simple
)File
to imports ofPath
in various Haskell files and notebooks, e.g.funflow/test/flows/TestFunflow.hs
)jupyterWith
dependency which was hardcoded to Niv depency toofunflow-examples/makefile-tool/src/Types.hs
jupyterWith
dependency to Niv (currently hardcoded)shell.nix
seems to build docker-client and funflow (because of overlays?)Closes #193