haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.61k stars 691 forks source link

Multi-repl doesn't support renaming of reexported modules #10181

Open coot opened 2 months ago

coot commented 2 months ago

Describe the bug

Loading mutliple components where one reexports a module from the other one fails with:

cabal repl io-classes:io-classes io-classes:strict-stm 
Resolving dependencies...
Build profile: -w ghc-9.8.2 -O1
In order, the following will be built (use -v for more details):
 - io-classes-1.5.0.0 (interactive) (lib) (configuration changed)
 - io-classes-1.5.0.0 (interactive) (lib:strict-stm) (configuration changed)
Configuring library for io-classes-1.5.0.0...
Preprocessing library for io-classes-1.5.0.0...
Configuring library 'strict-stm' for io-classes-1.5.0.0...
Preprocessing library 'strict-stm' for io-classes-1.5.0.0...
GHCi, version 9.8.2: https://www.haskell.org/ghc/  :? for help
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Command is not supported (yet) in multi-mode
Loaded GHCi configuration from /home/coot/.ghci

<no location info>: error: [GHC-68286]
    Modules are listed as reexported in options for ‘io-classes-1.5.0.0-inplace-strict-stm’ but can't be found in any dependency:
        Control.Concurrent.Class.MonadSTM.Strict.TSem

To Reproduce This can be reproduced using coot/io-classes branch of the input-output-hk/io-sim repo. If reexported-modules in strict-stm package is removed from the io-classes.cabal file the session is loaded.

System information

mpickering commented 1 month ago

The ghc flag --rexported-module does not support renaming modules when they are rexported yet.

I opened a GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/25139