Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Rethink/rework the HIE BIOS #1053

Closed
Closed

Description

@alanz

haskell-ide-engine has the concept of a BIOS. which is the layer that interfaces with the underlying operating system, package manager, etc.

To date, we have been using modified versions of cabal-helper and ghc-mod, in forked repos from the main upstream.

It has now been several years, and we still cannot put hie onto hackage, because we do not have a clean dependency list.

So, time to reconsider our options.

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

Activity

  1. added this to the 2019-02 milestone on Jan 14, 2019
  2. Avi-D-coder commented on Jan 14, 2019

    @Avi-D-coder
    Collaborator

    How do the .hie files affect this? Will ghc-mod still be needed?

  3. alanz commented on Jan 14, 2019

    @alanz
    CollaboratorAuthor

    @Avi-D-coder The .hie files 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.

  4. lorenzo commented on Jan 14, 2019

    @lorenzo
    Collaborator

    What would be your preferred solution @alanz ?

  5. alanz commented on Jan 14, 2019

    @alanz
    CollaboratorAuthor

    @lorenzo I would rather keep an open mind at this stage, tbh.

  6. lukel97 commented on Jan 16, 2019

    @lukel97
    Collaborator

    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?

  7. alanz commented on Jan 16, 2019

    @alanz
    CollaboratorAuthor

    @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.

  8. shmish111 commented on Jan 29, 2019

    @shmish111

    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.

  9. alanz commented on Jan 29, 2019

    @alanz
    CollaboratorAuthor

    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.

  10. eskimor commented on Jan 30, 2019

    @eskimor

    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.

  11. lorenzo commented on Jan 30, 2019

    @lorenzo
    Collaborator

    @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

  12. mpickering commented on Feb 24, 2019

    @mpickering
    Collaborator

    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)

  13. DanielG commented on Feb 24, 2019

    @DanielG
    Collaborator

    @mpickering could you elaborate on your plan a bit? You see, I also have a plan which means we might be duplicating effort :)

  14. eskimor commented on Feb 25, 2019

    @eskimor

    @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.

  15. modified the milestones: 2019-02, 2019-03 on Mar 2, 2019
  16. modified the milestones: 2019-03, 2019-04 on Apr 6, 2019
  17. modified the milestones: 2019-04, 2019-05 on May 4, 2019
  18. modified the milestones: 2019-05, 2019-06 on Jun 1, 2019
  19. modified the milestones: 2019-06, Some time on Jul 7, 2019
  20. lukel97 commented on Dec 20, 2019

    @lukel97
    Collaborator

    Done in #1126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions