Skip to content

Install HLS on the fly #700

@MischaPanch

Description

@MischaPanch

So thinking about on the fly HLS installation...

  • Current approach: PR requires HLS to be pre-installed (ghcup, stack, cabal, or system PATH). The language server gracefully
    fails if HLS isn't found.
  • Proposed enhancement: Automatically download/install HLS if missing.

Trade-offs to discuss:

  • Pro: Better user experience - works immediately without manual setup
  • Con: Adds complexity - need to handle multiple installation methods (ghcup, stack, cabal, brew)
  • Con: Platform-specific logic (macOS/brew, Linux/ghcup, Windows/?)
  • Con: May require elevated permissions for system-wide installation
  • Con: Version management complexity (which HLS version works with which GHC?)

I already removed the unrelated files.
- I think we should defer the on-the-fly download enhancement to a follow-up PR because:
- Current PR already provides full HLS functionality for users who have it installed
- The enhancement is non-trivial and needs careful design (installation method, version compatibility, error handling). I will need time to get it right. And even if I do get it working I think it will be brittle. OS upgrades, package manager changes, etc..
- Better to get core functionality merged first, then enhance installation UX

Thoughts?

Originally posted by @ketema in #697 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions