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
Add haskell-ide-engine. #32947
Add haskell-ide-engine. #32947
Conversation
@Fresheyeball @imalsogreg Can you test and see if this fits the bill of your bounty? |
@shlevy While I love you forever for putting |
@Fresheyeball Yes, but if you pop |
@shlevy ok, let me test. |
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. I'd be happy if we can avoid checking the patch files into our repo, though. Is that possible?
@@ -71,4 +71,12 @@ self: super: { | |||
# https://github.com/aristidb/aws/issues/238 | |||
aws = doJailbreak super.aws; | |||
|
|||
# There's no 8.2 testsuite |
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.
The changes to configuration-ghc-8.2.x.nix
seem to be orthogonal to the addition of the HIE package set. Can you please submit those fixes separately (or commit them directly) to take them out of this PR for easier reviewing?
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.
👍
# There's no 8.2 testsuite | ||
ghc-exactprint = dontCheck super.ghc-exactprint; | ||
|
||
# Missing FlexibleContexts in test suite |
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.
Is upstream aware of this issue? If they are, do you have a link to the upstream ticket so that we can see the current state of this bug?
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.
I'll open a ticket, thanks.
# Missing FlexibleContexts in test suite | ||
monad-memo = dontCheck super.monad-memo; | ||
|
||
haddock-api = super.haddock-api.override |
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.
Is this override specific to GHC 8.2.2? It looks like it might belong into configuration-nix.nix
or configuration-common.nix
.
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.
Right, I confused myself about the order of overrides, I didn't want to overwrite the old versions uses in 7.10 and 7.8. Will fix.
@@ -0,0 +1,2 @@ | |||
args@{ pkgs, stdenv, callPackage }: self: | |||
(import ./hackage-packages.nix args self) // (import ./hie-packages.nix args self) |
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.
Please reverse the order of that set update to make sure that no entry in hie-packages can ever replace an entry of the same name in hackage-packages.
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.
👍
@@ -0,0 +1,46 @@ | |||
diff -Naur haddock-library-1.4.4-orig/haddock-library.cabal haddock-library-1.4.4/haddock-library.cabal |
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.
Are those patch files maybe available for download from somewhere so that we don't have to check them into our repository?
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 one isn't available elsewhere. I should probably open an issue upstream, this is only needed because install doesn't work right yet with sublibraries.
@@ -0,0 +1,23 @@ | |||
commit ae0fb7a79a8912cf7a40bee418db239a7188805c |
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.
Ditto. Can this file be downloaded from somewhere else?
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 is from a PR, I'll fetch it
@@ -0,0 +1,40 @@ | |||
diff --git a/test/HaRePluginSpec.hs b/test/HaRePluginSpec.hs |
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.
Ditto. Can this file be downloaded from somewhere else?
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 is a workaround, not a real fix, and doesn't exist anywhere yet.
@@ -71,4 +71,12 @@ self: super: { | |||
# https://github.com/aristidb/aws/issues/238 | |||
aws = doJailbreak super.aws; | |||
|
|||
# There's no 8.2 testsuite |
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.
👍
# There's no 8.2 testsuite | ||
ghc-exactprint = dontCheck super.ghc-exactprint; | ||
|
||
# Missing FlexibleContexts in test suite |
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.
I'll open a ticket, thanks.
# Missing FlexibleContexts in test suite | ||
monad-memo = dontCheck super.monad-memo; | ||
|
||
haddock-api = super.haddock-api.override |
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.
Right, I confused myself about the order of overrides, I didn't want to overwrite the old versions uses in 7.10 and 7.8. Will fix.
HaRe = self.HaRe_hie; | ||
in | ||
{ # This isn't really hie-specific, should probably go in cabal2nix | ||
haddock-library_1_4_4 = callPackage |
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.
@peti What's the right way to add this to hackage-packages.nix?
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.
Just add it to the extra-packages
section in pkgs/development/haskell-modules/configuration-hackage2nix.yaml
. Then it will appear in the main package set within a couple of days (i.e. whenever I think of merging haskell-updates
into master
).
@@ -0,0 +1,2 @@ | |||
args@{ pkgs, stdenv, callPackage }: self: | |||
(import ./hackage-packages.nix args self) // (import ./hie-packages.nix args self) |
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.
👍
@@ -0,0 +1,46 @@ | |||
diff -Naur haddock-library-1.4.4-orig/haddock-library.cabal haddock-library-1.4.4/haddock-library.cabal |
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 one isn't available elsewhere. I should probably open an issue upstream, this is only needed because install doesn't work right yet with sublibraries.
@@ -0,0 +1,23 @@ | |||
commit ae0fb7a79a8912cf7a40bee418db239a7188805c |
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 is from a PR, I'll fetch it
@@ -0,0 +1,40 @@ | |||
diff --git a/test/HaRePluginSpec.hs b/test/HaRePluginSpec.hs |
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 is a workaround, not a real fix, and doesn't exist anywhere yet.
5d8ae27
to
de14451
Compare
@peti good now? |
de14451
to
f4fabf5
Compare
This is now on top of #32993 to avoid the need to patch |
@shlevy are |
@domenkozar Yes, though the bulk of it could be scripted pretty easily if updates become obnoxious |
Add to the next haskell-update iteration to avoid double re-building (and re-checking)? |
Right, I didn't notice a commit was from a different PR. |
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.
Great work! Please feel free to merge. I have added one more minor nit that you may want to address beforhand.
# https://github.com/haskell/cabal/issues/4969 | ||
haddock-library_1_4_4 = dontHaddock | ||
(super.haddock-library_1_4_4.override | ||
{ # The 'attoparsec' haddock-library depends on is its own |
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 issue is fixed in 40a3d77. cabal2nix-1.7.1
no longer generates the bogus dependency.
Silly question: will this handle Cabal@Nix projects, too? 😻 I.e. the Nix (not NixOS) part in haskell/haskell-ide-engine#357. |
@michalrus I don't really understand what you mean by |
f4fabf5
to
961907d
Compare
Pure Cabal projects with deps managed by Nix. =] Awesome, so it should just work. ♥ Thank you! ♥ ♥ Finally I can get rid of Intero and those hacks, which are ±useless, cf. michalrus/intero-nix-shim#7. |
|
@shlevy I'm seeing
( |
@Ericson2314 any idea about the issue @imalsogreg is seeing? Seems to have something to do with the dynamic loading stuff on darwin. |
@peti Ah, this is due to the lts bump. Will take a look soon. |
@shelvy I think that's a Darwin impurity from previous runs. |
@Ericson2314 ? What impure dir is being referenced there? |
@shlevy this sounds to be true, but I swear this hit this when working on the darwin dynamic linking stuff. The previous attempt earlier in the build (say |
@Ericson2314 That would be a huge bug in nix if true... |
@imalsogreg I think it should be fixed in #33333 |
(but there's still the hoogle issue to fix 😄 ) |
@shlevy @Ericson2314 Looking at the error message from cabal trying to solve version constraints, I tried (a) patching hoogle 5.0.15 to accept haskell-src-exts_1_19_1 and (b) dropping the nixpkgs override that sets haskell-src-exts to 1.20.1. This worked on my ubuntu machine. But the patch to hoogle introduces some ugly CPP to allow the newest hoogle to support both haskell-src-exts versions. So I'm wondering, is there another way to support hie-hoogle here? |
@imalsogreg I'll fix that side of things in a later PR. |
@shlevy making sure I understand: I should not try to get the |
Oh, if you can get it merged upstream that'd also be good. |
@imalsogreg should be fixed in 707cfbf |
@shlevy, according to https://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellPackages.haskell-ide-engine.x86_64-linux/all, the package hasn't seen a successful build yet, apparently because the test suite assumes network access. Would you mind taking a look at that issue? |
Hmm, I can’t build it on current unstable, 5402412:
|
@shlevy ^ |
I'll work on this but I'm not sure when I'll have time. |
Fixes #31697
References haskell/haskell-ide-engine#357