-
Notifications
You must be signed in to change notification settings - Fork 6
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
Restructure cabal file into a library with executables that depend on it #141
Conversation
CI is way too slow and actually fails on darwin. The main reason for the slowness is that each executable rebuilds all the modules from the library. This PR restructures the cabal file such that the executables depend on the library instead of on the source code of the library. This ensures the library is only built once. The reason the cabal files was structured like this was to support ghcid. However it seems GHCi supports loading multiple components nowadays.
It does? Last I checked GHC has some basic support, but it has not reached Cabal (for But yes, I am rarely interactively working on this code base right now, so if none else misses this, fine with me. |
I didn't actually check it but I followed the linked ticket (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/395) and the associated MRs were merged so I assumed there was better support.
Thanks. I hope that by this and future restructurings we can lower our CI times and get passed the failing darwin builds on some of our PRs. |
I still wonder how useful the Darwin build is at all. Shipping ic-ref to users never had a strong reason, and for our various CI tasks, Linux only should be fine. |
I really would like to get rid of it but it seems the sdk depends on it (3cc51be). |
Out of habit or because they care about it? I found https://forum.dfinity.org/t/future-of-the-ic-ref-emulator-dfx-start-emulator/9511 to be rather inconclusive. |
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.
LGTM
Thank you!
Fixed. BTW it would be cool to also publish the HPC coverage report to our GitHub pages. Will look into that in another PR. |
BTW I noticed that running |
Multi-component cabal repl makes progress: https://well-typed.com/blog/2023/03/cabal-multi-unit/ |
CI is way too slow and actually fails on darwin. The main reason for the slowness is that each executable rebuilds all the modules from the library.
This PR restructures the cabal file such that the executables depend on the library instead of on the source code of the library. This ensures the library is only built once.
The reason the cabal files was structured like this was to support ghcid. However most active maintainers are not using ghcid so we prefer to have faster builds instead.
Besides restructuring the cabal file this PR also switches building the haddocks from cabal to Nix which allows us to remove the
cabal.project
andcabal.project.freeze
files which has the advantage that acabal build
will then pick the dependencies from the nix-shell instead of building them itself.