Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Update to 1.2 #52

Closed
poscat0x04 opened this issue Mar 13, 2020 · 18 comments
Closed

Update to 1.2 #52

poscat0x04 opened this issue Mar 13, 2020 · 18 comments

Comments

@poscat0x04
Copy link

https://github.com/haskell/haskell-ide-engine/releases/tag/1.2

@infinisil
Copy link
Owner

Unfortunately stack2nix which I'm using for all-hies isn't maintained anymore, see input-output-hk/stack2nix#140 (comment)

And now this is causing problems, because newer stack versions are required now because of https://www.stackage.org/blog/2020/02/discontinuing-legacy-snapshots

So this is probably the time to do #19, will take a bit of work and figuring out though. I'll try to get to this soon.

@poscat0x04
Copy link
Author

Hmmm, maybe we can use cabal2nix? Are there any dependencies that are not covered by nixpkgs?

@infinisil
Copy link
Owner

That might work, but probably only with a lot of manual effort, because I'd have to potentially fix a lot of dependency builds (which I don't need to with stack), and that for all 7 GHC versions.

@poscat0x04
Copy link
Author

poscat0x04 commented Mar 13, 2020

Or we can just use stack to build a static binary (this is what archlinux is doing).

@infinisil
Copy link
Owner

With Nix it's not possible to just use stack directly, because it does very impure things.

@gurgl
Copy link

gurgl commented Mar 17, 2020

Looking forward to this too! Get issues with cabal-3.0.0.0 and ghc865 in hie 1.1. Read posts it might have something to do with Cabal Helper

@fendor
Copy link

fendor commented Mar 17, 2020

@gurgl Do you have any specific issue in mind? Because version 1.2 has only two bug-fixes, iirc.

@infinisil
Copy link
Owner

Tried to use haskell.nix for building all versions of HIE 1.2, but it seems like only about 8.6.4, 8.6.5 and 8.8.1 are supported by it, but HIE supports more versions than that. The branch is [here]https://github.com/Infinisil/all-hies/tree/haskell.nix), but I won't continue trying with this.

I'll look into using nixpkgs Haskell infra instead next.

@gurgl
Copy link

gurgl commented Mar 18, 2020

@fendor I was hoping this tweak of cabal-helper would resolve my issues. I might be wrong about that but still hope. haskell/haskell-ide-engine@16a8c08

Or are the stack files not applicable for nix builds?

@fendor
Copy link

fendor commented Mar 18, 2020

That patch is mainly development and build-related. IIRC, it does not fix any issues that happen at run-time. So, unless you say what your issues are and open an issue at the hie repo, I doubt that a random update will fix it :)

@poscat0x04
Copy link
Author

If we are going to use nixpkgs infra then we might as well just merge this package into the nixpkgs tree.

@infinisil
Copy link
Owner

If all GHC versions should continue to be supported, then that's not a possibility, as a single nixpkgs version only has a subset of them

@dansanduleac
Copy link

dansanduleac commented Apr 21, 2020

Tried to use haskell.nix for building all versions of HIE 1.2, but it seems like only about 8.6.4, 8.6.5 and 8.8.1 are supported by it, but HIE supports more versions than that. The branch is here, but I won't continue trying with this.

@infinisil May I ask how you got this to work? Specifically I can't seem to be able to nix-build update.nix, I run into:

these derivations will be built:
  /nix/store/hpfz51kjnjwzrg75fps0y8a0crhl6i93-nix-shell.drv
building '/nix/store/hpfz51kjnjwzrg75fps0y8a0crhl6i93-nix-shell.drv'...
nobuildPhase

This derivation is not meant to be built, aborting

builder for '/nix/store/hpfz51kjnjwzrg75fps0y8a0crhl6i93-nix-shell.drv' failed with exit code 1

and manually running the commands in the update script to attempt to generate the 882 variant, even from inside a nix-shell update.nix, runs into this error:

[nix-shell:~/code/all-hies]$ /nix/store/q2b95yl8hwpdyx9hl30nh4pxmxk1ck9i-nix-tools-0.1.0.0-exe-stack-to-nix/bin/stack-to-nix -o generated-new/ghc882 --stack-yaml /nix/store/zwc2kkrwzgcrsm3van3dgwyadb5qslf1-source/stack-8.8.2.yaml --cache /dev/null

[0.1 MiB DL]
stack-to-nix: nix-prefetch-git: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

caveat: I did try to run this against HIE 1.3

@infinisil
Copy link
Owner

infinisil commented Apr 21, 2020

@dansanduleac In that branch I have a new.nix file you can use to build HIE with e.g. nix-build new.nix -A ghc865. No guarantees about it though

@dansanduleac
Copy link

Ao ok, I didn't know where to start :) Thanks for the clarification!

@pbogdan
Copy link

pbogdan commented Apr 24, 2020

FWIW I hacked up stack2nix to work with stack 2.1 and save for the known issue with the base libraries it can produce working expressions for HIE 1.3 for at least a subset of GHC's.
The expressions are here at https://github.com/pbogdan/nix-hie and there's a nix-hie cachix binary cache for those as well.
It's only for my own personal use though so neither my stack2nix patches or the hie repo are very polished and may or may not be maintained going forward.

@infinisil
Copy link
Owner

I'm posting updates for haskell.nix builds in #19. GHC 8.6.5 and 8.8.3 builds are working now at least

mjhoy added a commit to mjhoy/dotfiles that referenced this issue May 30, 2020
@infinisil infinisil mentioned this issue Jul 25, 2020
3 tasks
@infinisil
Copy link
Owner

With #64 merged HIE was updated to a recent unstable version (after 1.4)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants