Skip to content

Multiple Home Units support #8238

Closed
Closed

Description

@chshersh

Currently (with cabal-install 3.6), when running cabal repl with multiple components, users see the following error message:

$ cabal repl comp1 comp2
cabal: Cannot open a repl for multiple components at once. The targets
'comp1' and 'comp2' refer to different components..

The reason for this limitation is that current versions of ghci do not support
loading multiple components as source. Load just one component and when you
make changes to a dependent component then quit and reload.

The ability to load REPL with multiple components is commonly known as "Multiple Home Units (MHU)". The following blog post by Matthew Pickering (Well-Typed) from January 7, 2022, claims that this feature is implemented in GHC and now it's up to build tools to support it:

I haven't found an issue in Cabal tracking the implementation of Multiple Home Units. There's a similar issue but it seems to be talking about something else:

Activity

  1. Mikolaj commented on Jun 22, 2022

    @Mikolaj
    Member

    Yes, I think you are right this is not being added yet and we do need it. PR welcome (perhaps many small PRs, baby step style)

  2. added this to the Considered for 3.10 milestone on Jul 23, 2022
  3. gbaz commented on Jul 23, 2022

    @gbaz
    Collaborator

    I think we could just have a single point of support for now that turns a repl call with multiple targets into an invocation of ghci with multiple home units. However, that won't be super useful yet, given ghci's apparently limited support of multiple home units still. https://gitlab.haskell.org/ghc/ghc/-/issues/20889

  4. phadej commented on Jul 24, 2022

    @phadej
    Collaborator

    Apparently @wz1000 is working on this?

  5. wz1000 commented on Jul 26, 2022

    @wz1000
    Contributor

    Yes, I'm working on this. I'll have a patch up shortly.

  6. ulysses4ever commented on Sep 16, 2022

    @ulysses4ever
    Collaborator

    @wz1000 just a gentle inquiry: do you have any news on that patch you mentioned?

  7. ocharles commented on Nov 27, 2023

    @ocharles
    Contributor

    Did #8726 fix this?

  8. mpickering commented on Nov 27, 2023

    @mpickering
    Collaborator

    Yes #8726 fixed this.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions