-
Notifications
You must be signed in to change notification settings - Fork 15
The future of all-hies #61
Comments
I didn't know people were actually globally installing! I've been using a hie.nix as follows:
(the hoogle and hpack patches don't actually work, I suppose they happen in a nix dir and that's not where hie takes as source directory nor would it be good using the intermediate nix dir as you'll be modifying the source on the project dir and not the nix build dir, but it'd be nice to find a way to automate these inside the nix expression) this'd be the nixpkgs.nix I used on that project I'm sampling from:
I had to skip the postgresql tests there because they rely on a running pgsql server and even though it was running it just wouldn't connect when running the test. before I added postgresql into the mix I didn't need it as complicated but it's good to know how to modify whether to run tests on packages (and how is that done with haskell.nix) and a nix-hie-wrapper like this:
that I set VSCode to use you can base on them (and fix) for the template project repo. and adapt to haskell.nix. I'm excited at haskell.nix and would like to start using it actually |
Hey thank you so much for your work on this. If you have time, could you tell my why hie does not include ghc? IIUC, hie contains and depends on all kinds of tools and libraries among them ghc. Something really great about Nix seems to me, to be able to have more or less isolated, reproducable and self-sufficient installations, by using full transitive closures containing baked-in nix-store paths to the dependencies. So, while I might totally be Danning-Kruger-ing this, I wonder if it would be possible to have the IDE tooling come autonomous, batteries included, i.e. hie including a/the suitable ghc. Maybe the implications could be, that the compilation outputs of a user submitted |
@mikelpr Nice! The template repository could maybe contain one version using the nixpkgs tooling and another using the haskell.nix one. @sheyll In the Nix world, GHC binaries come preconfigured with the packages of your project, so e.g. you'd use |
I also made a repository for hie by reusing the code from hls-nix: https://github.com/poscat0x04/hie-nix. |
So you can split the effort and responsibility. I never understand why people go the rivalry way when it is much more effective to discuss how to work together and split the effort and responsibility, use each-others gifted work and build your lean solutions and extend modules that provide features. The NIH syndrome is a staple of systematic issues and not growing. And reuse of work of others is the actual staple of quality of a person and the creation. |
@Anton-Latukha I'm confused, is that a complaint or a congratulation? |
A statement. |
"There are forces in nature called Love and Hate. The force of Love causes elements to be attracted to each other and to be built up into some particular form..., and the force of Hate causes the decomposition of things." Empedoklēs, c. 494 – c. 434 BC. |
I just opened #64 to implement the things here, check there for future updates |
This is now implemented with #64 :) |
Here's a project update, what's been happening and what the plan is for the future. This addresses #60.
What's happened?
Disregarding the issues with Cabal and glibc, everything worked decently up until the HIE 1.1 release. The first problem started appearing with with Stackage deprecating legacy snapshots, because the no-longer-maintained
stack2nix
tool, which was used to update all-hies, relied on them. As such, all-hies became frozen at version 1.1, leading to #52.As time advanced, GHC 8.8.3 was released, and people started updating to it, leading to #55. So, we can't use stack2nix anymore, what to do? I thought about it and experimented with different approaches.
extra-deps
field in HIE's stack.yaml, meaning this would have to be done manually, or somebody has to write a tool to convert that automatically, which is essentially what stack2nix did previously. This would be a whole lot of work and maintenance which I don't have the motivation forhaskell.nix
tooling, which is completely different than what nixpkgs uses, but its future looks very bright, even if it's a bit hard to understand currently (docs are being worked on though!)So I went to try haskell.nix, which lead to #19 being picked up again. After some PRs to haskell.nix and a bunch of debugging, I was able to at least build HIE (version 1.4!). However, only GHC 8.6.5 and 8.8.3 work for now. This is supposed to be all-hies, but I guess let's just go with it, we can fix the other builds later.
Okay, I got working HIE builds again, let's try them out! I open a GHC 8.8.3 project of mine, only to discover that cabal-helper fails to do its thing. Turns out the cabal-helper version in HIE 1.4 just doesn't work with those dependencies, pretty sure it's a bug. I intended all-hies to mainly be stable versions, but let's roll with unstable for now where this is fixed.
So now I have unstable HIE building for GHC 8.6.5 and 8.8.3. I decide to try out a 8.6.5 project, only to again discover that cabal-helper fails to do its thing. Turns out it's pretty tricky to get a working cabal-install and Cabal version into the environment, which is why #58 is an issue.
Now let's also not ignore #32, which happens whenever your GHC's glibc version doesn't match the one all-hies uses, which is just annoying.
So, there are a bunch of problems, it's a pretty messy situation, nothing really works.
The plan for the future
It can't continue like this, we need some big changes for a smooth IDE experience. I have the following plans (motivated by above):
These changes are not compatible with how all-hies currently works, meaning people will have to get an error about this. I believe all those changes will make an overall much better experience, as they should solve most of the current problems with all-hies.
I have a pretty good idea for how all those steps are done, so it shouldn't take too long for this to advance.
Ping @Anton-Latukha @mikelpr @bhipple
The text was updated successfully, but these errors were encountered: