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
haskell: Split boot libraries into individual outputs (take 2) #43070
Conversation
Great!! I did like your |
Yep, I can do it later as a separate PR, because I would still like to somewhat clean up the way things are passed around there. But I need you to help me by answering my questions in the previous PR 🙂. |
I saw that after posting here, sorry, and just did a bit there. |
Am I misunderstanding, or isn't this just going to make the issues with too many command line arguments even worse? |
I don’t know 🤷♂️. In any case, this change is orthogonal to those issues and even if it makes them worse, let’s hope they will get eventually resolved by fixing the root cause. |
@ElvishJerricco It should just add a few more. |
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.
Wouldn't it be far simpler to clean out all undesirable package config files from the generated package.conf.d
directory so that only those mentioned in setup-depends
actually show up in there?
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.
ghc is the wrong place to fix #42069. The issue is caused by incorrect code in the generic builder and it ought to be fixed there, not in the compiler.
@peti All this story is not specific to |
Yes, this is true. From that point of view, an ideal solution would be to have a derivation per core library and to adapt the overrides to point to them (rather than |
How did you test this PR? |
I can’t say that I tested it a lot, as it was meant mostly as a PoC and RFC. I built a couple of heavy packages ( |
@@ -148,7 +158,9 @@ let | |||
''; | |||
}); | |||
|
|||
in package-set { inherit pkgs stdenv callPackage; } self // { | |||
in genAttrs (ghc.passthru.bootPackages or []) (name: ghc."${haskellLib.toOutputName name}") // |
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.
You should leave off the passthru
part. It should just be ghc.bootPackages.
Does something like ghci still work with this? I would think that it wouldn't be able to find the right dependencies outside of cabal2nix. We may need to tell GHC at build time where the destination will be - otherwise you will only be able to use GHC base outside of a Nix builder with something like this:
|
To improve UX with ghci we should probably make all ghc environments that are meant to be used interactively include |
I build a couple of heavy packages (pandoc, stack) ...
What about the 'ghcWithPackages' and 'ghcWithHoogle' functions? Do these
still work and do they produce correctly working environments? Also,
does 'callHackage' still work?
|
@peti I think it might be time we stop pulling boot packages from ghc build and instead just grab the matching version from Hackage and compile it again... The number of boot packages that cannot be built this way is hopefully small and we’ll have to handle them separately. Any ideas? |
@kirelagin I'm all for compiling again: It could well be simpler, and is closer to what we want to end up doing (build GHC without libraries). But if need be, we can fake |
FTR here is another bug: |
FTR I have just realised that GHC executable itself works only because of the stale pkgdb cache :/. |
I think we should just leave those libraries that are built together with GHC alone as much as possible, just pretend that they are merely a part of the resulting compiler and don’t use them for anything else. Then we’ll have real derivations for boot libraries, most of them will be just plain versions form Hackage and those that cannot be compiled will be like in #43300. |
@kirelagin I think that should move us away from a multiple output direction then? If you notice there's some wrapping with a We can also protype the shimming + fresh separately-built boot libraries with the prebuilt GHCs and prebuilt-GHC-built- |
Any updates on this pull request? |
Similar to #39735 (comment), this is quite old, and hasn't seen any updates recently, so I am going to go ahead and close it. If anyone is interested in pursuing this, please feel free to open a new PR on the current |
This is like #43017 (fix for #42069), but:
I am still not sure what to do with ghcjs (and whether anything needs to be done at all).
@Ericson2314