Skip to content

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

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

Open
coot opened this issue Jul 6, 2024 · 2 comments · May be fixed by #10880
Open

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

coot opened this issue Jul 6, 2024 · 2 comments · May be fixed by #10880

Comments

@coot
Copy link
Collaborator

coot commented Jul 6, 2024

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

  • cabal-3.12.1.0
  • ghc-9.8.2
@mpickering
Copy link
Collaborator

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

@ulysses4ever ulysses4ever changed the title Loading multiple component with reexported module Multi-repl doesn't support renaming of reexported modules Aug 5, 2024
mpickering added a commit that referenced this issue Mar 28, 2025
In ghc-9.12 the -rexported-module flag was extended to add support for
module renaming.

Therefore now if a module uses a module renaming, then the
-reexported-module flag is passed the renaming.

Fixes #10181
@mpickering mpickering linked a pull request Mar 28, 2025 that will close this issue
8 tasks
@mpickering
Copy link
Collaborator

I have fixed this on the cabal side in #10880

mpickering added a commit that referenced this issue Mar 28, 2025
In ghc-9.12 the -rexported-module flag was extended to add support for
module renaming.

Therefore now if a module uses a module renaming, then the
-reexported-module flag is passed the renaming.

Fixes #10181
mpickering added a commit that referenced this issue Apr 10, 2025
In ghc-9.12 the -rexported-module flag was extended to add support for
module renaming.

Therefore now if a module uses a module renaming, then the
-reexported-module flag is passed the renaming.

Fixes #10181
mpickering added a commit that referenced this issue Apr 10, 2025
In ghc-9.12 the -rexported-module flag was extended to add support for
module renaming.

Therefore now if a module uses a module renaming, then the
-reexported-module flag is passed the renaming.

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

Successfully merging a pull request may close this issue.

3 participants