You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Something else, perhaps based on what ghcid is doing.
Prerequisites are that it supports stack, cabal old build, cabal new-build, and nix.
But, realistically, we can assume GHC >= 8.2.2, and for the cabal builds, cabal-install >= 2.4.1.0
What exactly would the first option (getting cabal-helper/ghc-mod onto Hackage) involve? Would it be the case that we would have the HIE forks as a separate package on Hackage a-la cabal-helper-hie ghc-mod-hie?
I am very interested in this issue as I have been unable to get ghc-mod working on my OSX laptop (or a windows laptop previously) and I have tried many times over the last 3 years, including using nix.
Have you looked at https://github.com/google/haskell-indexer I doubt is has everything that is needed but it should provide a strong foundation for all the features that require static analysis. Additionally it doesn't load the whole index into memory and it is designed to be able to work with very large projects, something I feel ghc-mod or any tool that creates an in-memory index would struggle with.
it would be great if HIE didn't require cabal, rather cabal and stack features should be optional, as would features for Bazel or Shake or any other build system.
That is an interesting split point, and probably makes sense, given that in hie we basically want to know the shape of a project, and then load files as needed into GHC, regardless of how the specific config came about.
And I understand this is one of the great strengths of ghcid, it basically piggy-backs on ghci, so can work in any context where it is possible to start it up.
I think making use of ghci together with this https://ghc.haskell.org/trac/ghc/ticket/15461 would improve/simplify things a lot! Also this would probably open the possibility for an obelisk project for example to re-use the ghci session ob run is using for hie, so I don't need to tell hie how to spawn a proper ghci session for my project and I don't end up having two ghci sessions running, which at best are wasting resources and worst might even interfere with each other.
@mpickering awesome! :-) That's fortunately very easy as obelisk comes with an example project.
Just install obelisk as described here, then create some empty directory and run ob init from within - you will get very small (and useless) example web service. Start the ghcid session with ob run.
Activity
alanz commentedon Jan 14, 2019
See also https://ghc.haskell.org/trac/ghc/ticket/15461
Avi-D-coder commentedon Jan 14, 2019
How do the
.hiefiles affect this? Willghc-modstill be needed?alanz commentedon Jan 14, 2019
@Avi-D-coder The
.hiefiles are unrelated. This is about being able to load a module under development, so that we can get information out of it.This also includes managed a partly-edited but unsaved file.
lorenzo commentedon Jan 14, 2019
What would be your preferred solution @alanz ?
alanz commentedon Jan 14, 2019
@lorenzo I would rather keep an open mind at this stage, tbh.
lukel97 commentedon Jan 16, 2019
What exactly would the first option (getting cabal-helper/ghc-mod onto Hackage) involve? Would it be the case that we would have the HIE forks as a separate package on Hackage a-la cabal-helper-hie ghc-mod-hie?
alanz commentedon Jan 16, 2019
@bubba Ideally it would involve getting them to a point where @DanielG would merge the changes and publish.
But I am concerned about his available time for this.
shmish111 commentedon Jan 29, 2019
I am very interested in this issue as I have been unable to get ghc-mod working on my OSX laptop (or a windows laptop previously) and I have tried many times over the last 3 years, including using nix.
Have you looked at https://github.com/google/haskell-indexer I doubt is has everything that is needed but it should provide a strong foundation for all the features that require static analysis. Additionally it doesn't load the whole index into memory and it is designed to be able to work with very large projects, something I feel ghc-mod or any tool that creates an in-memory index would struggle with.
And finally, I would really like to get this to work with https://github.com/tweag/rules_haskell so it would be great if HIE didn't require cabal, rather cabal and stack features should be optional, as would features for Bazel or Shake or any other build system.
alanz commentedon Jan 29, 2019
That is an interesting split point, and probably makes sense, given that in hie we basically want to know the shape of a project, and then load files as needed into GHC, regardless of how the specific config came about.
And I understand this is one of the great strengths of
ghcid, it basically piggy-backs onghci, so can work in any context where it is possible to start it up.eskimor commentedon Jan 30, 2019
I think making use of ghci together with this https://ghc.haskell.org/trac/ghc/ticket/15461 would improve/simplify things a lot! Also this would probably open the possibility for an obelisk project for example to re-use the ghci session
ob runis using forhie, so I don't need to tellhiehow to spawn a proper ghci session for my project and I don't end up having two ghci sessions running, which at best are wasting resources and worst might even interfere with each other.lorenzo commentedon Jan 30, 2019
@alanz would it be feasible to propose https://ghc.haskell.org/trac/ghc/ticket/15461 as a summer of code project? Sounds like it could be really handy for us
mpickering commentedon Feb 24, 2019
I have a plan which will allow implementing HIE support for bazel, obelisk etc.
@shmish111 @eskimor Can you provide me some simple sample projects which I can use to test my implementation? (Nix compatible instructions preferable)
DanielG commentedon Feb 24, 2019
@mpickering could you elaborate on your plan a bit? You see, I also have a plan which means we might be duplicating effort :)
eskimor commentedon Feb 25, 2019
@mpickering awesome! :-) That's fortunately very easy as obelisk comes with an example project.
Just install obelisk as described here, then create some empty directory and run
ob initfrom within - you will get very small (and useless) example web service. Start the ghcid session withob run.lukel97 commentedon Dec 20, 2019
Done in #1126