Improve suggestion for adding build-depends
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
When trying to build [facebookincubator/Glean](https://github.com/facebookincubator/Glean), I got an error with a suggestion:
```
Could not load module ‘Glean.Internal.Types’
It is a member of the hidden package ‘glean-0.1.0.0’.
Perhaps you need to add ‘glean’ to the build-depends in your .cabal file.
```
This suggestion is incorrect, because the error came about when trying to build the `gen-schema` target in `glean.cabal`.
**To Reproduce**
You can follow the Glean [build instructions](https://glean.software/docs/building/) but that's probably overkill. It should be possible to repro this by creating a minimal version of `glean.cabal`.
**Expected behavior**
In this context, the correct suggestion would be to add a dependency on `glean:if-internal-hs` since that is the only library target which includes `Glean.Internal.Types`.
**System information**
- Ubuntu 22.04
- cabal 3.6.2.0, ghc 8.10.7
Contributor guide
Assessment
This issue has not been assessed yet.