Skip to content

Download required haskell toolchain via ghcup in hls-wrapper #2251

Closed
@jneira

Description

@jneira
  • To complete the initial experience with haskell including hls we could add the possibility of download the required and missing haskell toolchain in hls-wrapper, using the info from the project or file from hie-bios
  • ghcup is the unique haskell installer which cover the default toolchain for all major oss: ghc, stack and cabal
  • Cases:
    • missing haskell-language-server: ghcup install hls. It will install another hls-wrapper which maybe will replace the used one. To consider.
      • maybe we could warn users about
    • cabal cradle: do a ghcup install cabal && ghcup install ghc ${version}, where ${version} will be the ghc version reported by the cradle or empty if it is not known, after downloading cabal itself (needed for query the ghc version)
      • it will download only the missing tool, cabal or ghc
    • stack cradle: do a ghcup install stack and let stack download the rest of needed tools (as with the default stack via ghcup will download ghc and/or msys2 in its own)
    • direct cradle: do a ghcup install ghc
    • bios cradle: do nothing
  • We have to decide what to do if ghcup itself is missing:
    • do nothing
    • download ghcup
    • suggest user install it
  • The feature will be triggered by default and disabled with --no-download-haskell-toolchain The feature will be disabled by default and enabled with --download-haskell-toolchain

Alternatives:

  1. do nothing, let users install the toolchain as they wish
  2. implement it only in the vscode extension (using ghcup)
  3. implement hook in hls-wrapper and provide a default one in vscode
  4. implement it opt-in in the hls-wrapper

//cc @hasufell

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot actionable, because discussion is still ongoing or there's no decision yettype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions