-
Notifications
You must be signed in to change notification settings - Fork 248
Fix setup-depends dependencies #124
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
Conversation
BTW it's been my long-standing intention to make setup a proper component in Cabal/cabal-install too. |
@Ericson2314 please be my guest! ;-) is be happy to see the Setup.hs being a component. You’ll end up with some minor bootstrapping issue though. You’ll need the Setup.hs to build the Setup component :-) Unless you go through cabal-install, but then how do you build cabal-install? |
@angerman setup components would be exe components without custom setups in practice, but yes the implementation would probably be able to deal with such a thing. It's not that different than haskell/cabal#4047 was an issue made after I talked to ezyang. Wow that was a long time ago. I think after I'm with my current rummaging around in GHC I'll get back to Cabal so will still be a long ways off. |
3944a13
to
df8c734
Compare
This PR had conflicts with the |
Sorry about that, I had to move stuff. |
No worries. Totally worth it, the shellFor stuff is awesome. |
@hamishmack can we rebase this and get it ready for merging? |
fa40a7f
to
bcdd830
Compare
@hamishmack is this still a draft or is this ready? |
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.
Apologies for the late review.
Would it be possible to use the makeConfigFiles
function in setup-builder.nix?
Because I see a chunk of hairy code which is duplicated here.
fac642f
to
cd1f96f
Compare
It looks better now. But I can still see make-config-files is imported twice. Would it be possible to define all the parts of the builder at the top-level builder/default.nix? This will untangle the dependencies a bit. I pushed a commit with this rearrangement, but didn't test that it works. |
@hamishmack can we get this finished? |
ebd61c7
to
95f1ae7
Compare
83735ba
to
3872708
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.
Looks good to me!
The test failure was related to |
Hmm, tricky. Rather than fiddling with the project package set, could we grab the setup depends out of a separate package set? (Like the |
7dbe956
to
a1fd9de
Compare
It turns out that yesterday when I tested I tried again with just ghc 8.6.5 in the shell and I think we should be ok as long as people use |
I should have said: take care not to use |
The file `conduit.hs` looks like `Conduit.hs` to ghc and it uses it by mistake for `import Conduit`.
That's interesting. Maybe I should I document it? Or maybe there's some other way of avoiding this problem. Seems like something that users might hit every so often. |
I would note I made exactly the same mistake. We use the normal |
bfaa6d8
to
b224850
Compare
6637811
to
0975269
Compare
Just checking, are the latest commits necessary to fix setup-depends dependencies? Could we merge a basic fix first, then address enabling tests and more cross-compilation fixes? |
I am not sure they are necessary. I am worried that the setup-depends changes introduce new dependencies on |
I agree with @rvl here. I think it would be good to have this one split, with the last two commits in a separate PR. We are going to squash this anyway, and I'm afraid we are conflating stuff here otherwise. Specifically as 8faff20 looks remarkably like #134. Also, CI was green at 2d2b4f9. So I think this should be fine to split. |
8faff20
to
2d2b4f9
Compare
Ok. I have removed the last two commits. |
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.
One more change and I think we are golden :-)
builder/setup-builder.nix
Outdated
@@ -0,0 +1,46 @@ | |||
{ stdenv, buildPackages, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeConfigFiles }: |
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.
{ stdenv, buildPackages, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeConfigFiles }: | |
{ buildPackages, stdenv, lib, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeConfigFiles }: |
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.
This seems to be outdated.
Co-Authored-By: Moritz Angermann <[email protected]>
Needs input-output-hk/nix-tools#51