Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Home Units support #8238

Closed
chshersh opened this issue Jun 21, 2022 · 7 comments
Closed

Multiple Home Units support #8238

chshersh opened this issue Jun 21, 2022 · 7 comments

Comments

@chshersh
Copy link
Member

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:

@Mikolaj
Copy link
Member

Mikolaj commented Jun 22, 2022

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)

@gbaz
Copy link
Collaborator

gbaz commented Jul 23, 2022

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

@phadej
Copy link
Collaborator

phadej commented Jul 24, 2022

Apparently @wz1000 is working on this?

@wz1000
Copy link
Contributor

wz1000 commented Jul 26, 2022

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

@ulysses4ever
Copy link
Collaborator

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

@ocharles
Copy link
Contributor

Did #8726 fix this?

@mpickering
Copy link
Collaborator

Yes #8726 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants