Skip to content

State of multiple home units for HLS #3738

Closed
@fendor

Description

@fendor

Loading multiple cabal/stack components into HLS has been a pain point since its early beginnings.
Essentially, it allows us to provide diagnostics and code actions across components, such as libraries, executables, test suites, etc...

In this issue, we outline the current progress of native multiple home unit support.

This means, we have native multi repl support for cabal >=3.11 and GHC >=9.4 once hie-bios's #409 is merged and published.


However, not everyone can switch to cabal-3.12 (once it is released), so we are thinking about adding custom support for older cabal versions, using build-info and exploiting the information from plan.json. The idea is as follows:

  • For all targets, figure out the component they belong to using build-info.json
  • Calculate the dependency closure of all targets that shall be loaded into the same GHC session. This upholds the closure property for GHC.
  • Read the respective build-info.json files to find the build options of local components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions