-
Notifications
You must be signed in to change notification settings - Fork 691
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
GHC 9.4.2/Cabal 3.8.1.0 and PackageImports with reexported-modules - Problem #8548
Comments
Hey @mpilgrem and thanks for the report! I don't have any deep insight into it, but by the look of it, it feels like a GHC bug. Indicative of it is that changing the version of GHC can make the bug come and go. Do you think you could post this on the GHC's bug tracker to see what the folks over there have to say about it? |
It does reproduces without |
@ulysses4ever, I'm happy to raise it on GHC's issue tracker. What I was not sure about is that switching between GHCs also switches between the version of the |
@mpilgrem no, when you build your local project, GHC's boot Cabal version doesn't matter. It's your cabal-install or stack with whatever version of Cabal they were built that matters. |
@ulysses4ever, I am pretty sure Stack builds a |
My bad, I’m very illiterate w.r.t stack and shouldn’t have guessed. On the other hand, I think that for cabal-install my claim still stands, and the bug reproduces with cabal-install. |
The GHC issue is here: https://gitlab.haskell.org/ghc/ghc/-/issues/22333 |
I confirm the reproducer on MacOS - fails with GHC-9.4.2, and passes with GHC-9.2.4. |
Let's block it on GHC until we know more. |
https://gitlab.haskell.org/ghc/ghc/-/issues/22333 has been fixed. Close this issue? |
I am having problems with GHC 9.4.2/
Cabal-3.8.1.0
andPackageImports
with Cabal'sreexported-modules
. I think what I am experiencing is a bug - I apologise if it is 'by design'. To explain:I have a library in package
my-package-B
which exposes moduleLibB
. I have a library in packagemy-package-A
whichbuild-depends
onmy-package-B
and hasreexported-modules
LibB
.Finally, I have an executable in package
my-package-C
whichbuild-depends
onmy-package-A
(only), and hasMain.hs
:With
stack --resolver ghc-9.2.4 build
, it all builds as expected.However, with
stack --resolver ghc-9.4.2 build
, and all else equal, the build fails with Cabal message:I can't make sense of the error message. I've requested
LibB
be imported from packagemy-package-A
and I'm told it can't be found but perhaps I meanLibB
reexported bymy-package-A
?However, if I change (only)
Main.hs
to (no package-qualified import):stack --resolver ghc-9.4.2 build
now works! That is why I think it is a bug.The text was updated successfully, but these errors were encountered: