Skip to content
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

Granular building of Haskell modules? #1524

Closed
L-as opened this issue Jun 20, 2022 · 3 comments
Closed

Granular building of Haskell modules? #1524

L-as opened this issue Jun 20, 2022 · 3 comments
Labels
enhancement New feature or request wontfix

Comments

@L-as
Copy link
Contributor

L-as commented Jun 20, 2022

A possibly big improvement for caching of build results (especially combined with content-addressing), could be having a single derivation per Haskell module.
This would allow caching to be much more granular, and small changes would only cause small rebuilds in CI.

Projects like https://github.com/matthewbauer/ghc-nix and https://github.com/awakesecurity/cabal2ninja are relevant.

The core issue is that the derivation graph depends on the result of previous derivations.
Dynamic derivations would have been the perfect tool for this, however, the PR has seemingly stalled for quite some time due to upstream communication issues (NixOS/nix#4628).
Another tool that can achieve the same thing effectively is IFD, albeit as noted in #1522 , this is problematic, however, perhaps fixing Nix would be enough?

@michaelpj
Copy link
Collaborator

The prior art here is https://github.com/nmattia/snack, where I believe it was found that this was a bad idea, as it generates far too many derivations, which bloats both evaluation and build times.

@L-as
Copy link
Contributor Author

L-as commented Jun 20, 2022

With proper dynamic derivations it inherently can not affect evaluation times as it is done at build time. It is possible that Nix is slow at handling many derivations, but I don't think it should be a problem since it's only increased by probably on average 100x per haskell library.

@yvan-sraka yvan-sraka added the enhancement New feature or request label Sep 20, 2022
@stale
Copy link

stale bot commented Jan 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 18, 2023
@stale stale bot closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix
Projects
None yet
Development

No branches or pull requests

3 participants