-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Component-based build support for cabal2nix
#603
Comments
cabal2nix
cabal2nix
This sounds like a pretty big idea. I am generally very much in favor of improvements to cabal2nix, but the constraints of living in nixpkgs are tough. Before you take on such a big undertaking, I wonder what use cases you are envisioning and if this approach actually helps. |
That's a really good point! Currently I'm switching my work CI over from using haskell.nix to the nixpkgs Haskell infra. The main thing I'm missing is component based builds. While this isn't blocking me from switching, I think it would be good to try to implement this to make things work better (faster builds, failing builds/tests blocking less of the graph). Since this is quite a big thing, I hope to whittle away at it when I get some time to improve CI. I'm also keeping in mind that the maintainers have limited time, so I want to approach this in whatever way y'all think is best, including dropping this if y'all think it's too much complexity. |
If we can find a good design for the features in question, I think it would be worth the effort. At least from my personal maintainer perspective. I wonder if it’d make sense to have a call about this, because it is really not clear where we want to go with this.
|
A call definitely sounds like a good shout.
I would definitely like to have this as well! In terms of the other points. I think you are right that these are going to be tricky. I think it should be doable to ensure that tests get run. One possibility is that the derivation that we make available to users is a package level summary of the components and so includes checks that the test suite and the test suites of dependencies have run. |
I think solving #539 will give us a better sense of the problem space of components, since we'd have to deal with them more explicitly in Then, for me, the logical next step would be to work on having One difficulty seems to indeed be how to depend on specific components of another package without breaking splicing, i.e. support for cross-compilation.
It seems to me that this is a big concern. If test suites can't fail the derivation, they become pointless. It seems to me that we need wrapping derivations
These wrapping derivations would be fairly trivial to build, ideally just symlinking a bunch of stuff and ensuring tests succeeded. There'd be an explosion in the number of derivations definitely. Another question is how to go about tests: Should the test component derivation directly run it? Probably, to avoid it having to be executed multiple times… |
I would love to have component-based build support for the nixpkgs haskell infra.
I understand that adding support for this is quite a big change. And I'm hoping to invest some time into implementing it.
Since this is quite a big addition I'm hoping to split it up into some smaller tasks.
The things I can think of are:
cabal2nix
to just emit one componentpassthru.tests
rather than have them run as part of a library's checkPhasecabal2nix
to emit all components as different .nix files.Setup.hs
into a separate shared derivation.I'm thinking of keeping all of these things opt-in to avoid breakage especially while support is only partial.
How does this sound as a vague plan?
The text was updated successfully, but these errors were encountered: