Open ffaf1 opened 1 year ago
See #9491 for similar problems.
Yes, I've got bitten by this and very much agree that there's a UX issue that can be solved to improve users' life.
More users having problems with mising modules in .cabal
.
I wonder if this could help (UX: user gets a barrage of abuse from the linker, but also a “0 errors, 1 warning” message at the end, gets curious, reads the message, adds the missing module).
Describe the bug
Related: #1746
I recently have helped a user with a well know error, forgetting to put modules in
exposed-modules
(edit: actually,other-modules
, but it is the same problem).What we know:
-Wmissing-home-modules
warning gets printed.The hint got probably overlooked because of the barrage of abuse by the linker
and the fact that warnings are not displayed again on a new
cabal run
.Expected behavior
The user notices the error, is able to understand it and fix it by themselves.
I would not know precisely what to suggest though: upgrading the warning to error could be annoying to a number of developers. Redirecting linker output somewhere too could break some dev setups.
To reproduce
Create a lib/exe
.cabal
, forget to expose a module in the lib that is needed by the exe.