-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
intero
is broken: stack
cannot run intero
#21495
Comments
Specifying
..i.e. it devolves to #21494 |
In short, the current
|
Also, I wonder if the recipe can/should be packaged into a NixOS test -- it involves fiddly integration across various components.. |
..same goes for fresher |
You need to let stack manage your haskell packages if you want to use intero. Don't add the intero haskell package to the dependencies, the intero emacs mode should install a suitable version of it into your stack environment automatically. |
For example, the following shell.nix works fine for me:
(Assuming that you have |
@bennofs, with nixpkgs commit
|
with nixpkgs
|
I guess |
Just start emacs and open a Haskell file (of the stack project), and turn on |
@bennofs, I see.. the nix-managed way used to work.. : -/ The stack-managed way has its complications -- now I need to thread some sort of a global $HOME through all my |
@deepfire why would you need a globally managed home? You'd only install it once per project, no? You can also just leave home as-is and stack will work fine, it'll even cache your packages in ~/.stack |
@bennofs I guess the problems I'm running into are still stack-intero-related, so I hope you don't mind if I ask here. I've extended your snippet to use I'm still running into problems -- so the increasingly apparent question is -- should I give up on Nix entirely, and let stack manage state globally for me? The problems appear during intero boot:
..and then intero boot fails like this:
|
Ouch. This has only really just started to sink in.. This is scary. So the fine and dandy definitions I make in But nix-driven environment creation used to work with not-so-much-older stack/intero (nixpkgs commit And intero was booting up instantly, happily picking up whatever was constructed by nix.. Are we giving up on this? |
Stack has never supported this, if it worked it was a miracle. Stack's Nix Integration is only meant to install non-haskell dependencies via Nix, the Haskell deps are still compiled by stack |
If it worked, it was probably due to GHC_PACKAGE_PATH interactions or something... But stack generally tries to isolate its ghc as much as possible (it tells ghc to ignore system or user package db, so stack's ghc does not see your packages) Or perhaps it was some interaction with nixpkgs ghc wrapper? |
you actually can get away with using nix to manage haskell deps, alongside intero. The trick is to set there's more about it here, including an example project skeleton http://anderspapitto.com/posts/2016-11-12-skeleton-ghc-ghcjs-project.html |
@anderspapitto does this cause any conflicts if the versions of the haskell packages that the |
yes, but you can avoid that and make everything work by setting |
This sounds like in case of intero "nix support" is actually counterproductive.. |
@anderspapitto, citizens celebrated -- the addition of |
Suggested action items:
|
@peti, do you think it would be worth documenting this use case? Somewhere around section 8.5.2.4 in the manual (http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-stack) ? |
I think that having a section about use in Intero would be nice. |
@deepfire @anderspapitto I would be really interested in such a guide. So far everything works if I use a global env ( Unfortunately this is not really flexible because it requires me to install/erase ghc-env whenever I switch from one project to another (or to use a Ideally I would like to make it work within a shell with something like PS: There has been a recent thread on reddit on that very subject and according to @ElvishJerricco the recipe described here fails short as soon as you want a nix sandbox per project. |
@PierreR
|
@PierreR, one crucial detail is to have In contrast, the way you define and use
|
@deepfire sorry to bug you with this but while trying your suggestion I have had a collision problem when running Of course I did try to I discover that the couple ( I have tried this with stable and 2 pinned versions of nixpkgs, no luck.
So I am not sure if it is at all possible to make the recipe works if one of the deps is @peti Any idea ? |
@PierreR, I have since faced the same issue, actually -- and it appears there is a solution:
|
@PierreR, alternatively, open
..then add these overrides to your own derivation's The issue here is that the overrides due to By globally choosing to follow stack's divergent versions of dependencies we can avoid the problem that accidentally appears when re-merging the trunks. |
For the record, the current setup I have is as follows:
|
Hitting this on September 2018 :( |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
As far as I know, most people have switched to HLS. There hasn't been comments on here in a few years, so I'll go ahead and close this. |
Issue description
The
emacs
/intero
integration is broken.Steps to reproduce
Technical details
de99dc50495e0fb75a039586b882d1cd1b51eb0b
)de99dc50495e0fb75a039586b882d1cd1b51eb0b
)The text was updated successfully, but these errors were encountered: