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

missing-home-modules reports unreferenced module with GHC 9.4.1 #8367

Closed
andreasabel opened this issue Aug 12, 2022 · 2 comments
Closed

missing-home-modules reports unreferenced module with GHC 9.4.1 #8367

andreasabel opened this issue Aug 12, 2022 · 2 comments

Comments

@andreasabel
Copy link
Member

andreasabel commented Aug 12, 2022

With GHC 9.4.1, I am encountering:

Building library for Agda-2.6.3..

<no location info>: error: [-Wmissing-home-modules, -Werror=missing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: 
        Agda.Utils.Ord

The respective module Agda.Utils.Ord exists in the source tree but isn't referenced from anywhere.

To reproduce, unpack error-missing-home-module.zip and type in the root directory:

cabal build -w ghc-9.4.1

This might be a GHC 9.4.1 regression. Upstream issue: https://gitlab.haskell.org/ghc/ghc/-/issues/22017

@ulysses4ever
Copy link
Collaborator

Interesting bug, thanks for submitting! I'm wondering if need to account for it on this bug tracker or GHC's one suffices. I mean, can we do something about it on our end?

@andreasabel
Copy link
Member Author

@mpickering found out that the module in question is referenced from a hs-boot file which in turn is not referenced. But apparently, GHC 9.4.1 takes such boot files into account no matter whether they are referenced or not.

I found some hint in the release notes:

GHC is now a bit better at detecting redundant hs-boot files and may report warnings where it previously did not. In such cases the correct solution is generally to remove the hs-boot file in question.

I think the remaining discussion can be carried out on the GHC bug tracker. In the beginning, I was not sure where the problem was, so I first opened the issue here.

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

2 participants