Skip to content

Integrate Cabal-Helper #4

Closed
Closed
@fendor

Description

@fendor

Since haskell/haskell-language-server#138 would render the Code in https://github.com/haskell/haskell-language-server/blob/master/src/Ide/Cradle.hs vastly obsolete, I would like to propose that this repo integrates Cabal-Helper, especially the CabalHelper Cradle.

A possible usage of Cabal-Helper in gen-hie would be to have two modes of generating a hie.yaml file:

  • heuristic (parsing .cabal file, etc...)
  • exact (using cabal-helper)

If you do not want to impose the dependencies on all consumers of this library, I think it would make sense to enable/disable the usage of cabal-helper via a cabal flag.

What this would bring:

  • Move vast parts of Cradle.hs to this repo, making it a possible implicit cradle discovery mechanism.
  • This repo becoming the only source of implicit cradle discovery.
  • Add a flag to gen-hie to use an exact heuristic for creating hie.yaml files.

I think this may bring us the best of both worlds: a more error resilient implicit cradle discovery in HLS, and the more exact generation of hie.yaml with cabal-helper.

The PR haskell/haskell-language-server#138 is unaffected from this issue in general.
cc @jneira

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions