Warn on missing home modules
ClosedPublic

Authored by Yuras on Jan 15 2017, 6:11 AM.

Details

Summary

Introduce a warning, -Wmissing-home-modules, to warn about
home modules, not listed in command line.

It is usefull for cabal when user fails to list a module
in exposed-modules and other-modules.

Test Plan

make TEST=MissingMod

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Yuras updated this revision to Diff 10479.Jan 15 2017, 6:11 AM
Yuras retitled this revision from to Warn on missing home modules.
Yuras updated this object.
Yuras edited the test plan for this revision. (Show Details)
Yuras updated the Trac tickets for this revision.
Yuras updated this revision to Diff 10483.Jan 15 2017, 9:53 AM
Yuras edited edge metadata.

Retry

T12234 failure looks unrelated for me, I see it in other builds. But recomp001 failure on osx is puzzling, does anyone has an idea what is going here? I can't reproduce it locally (linux).

Yes, don't worry about those failures. They are known and hopefully being dealt with.

mpickering requested changes to this revision.Jan 15 2017, 5:58 PM
mpickering added a reviewer: mpickering.

I have no comment about this patch but there are some typos.

docs/users_guide/using-warnings.rst
1038

typo. usefull -> useful

1040

typo. no -> nor

utils/mkUserGuidePart/Options/Warnings.hs
451

typo. usefull -> useful

452

again here. no -> nor

This revision now requires changes to proceed.Jan 15 2017, 5:58 PM
Yuras updated this revision to Diff 10494.Jan 16 2017, 1:48 AM
Yuras edited edge metadata.

Fix typos

Yuras marked 4 inline comments as done.Jan 16 2017, 1:50 AM
simonpj added inline comments.
compiler/main/GhcMake.hs
141

Please add a Note to explain the motivation, giving an example of what can go wrong, and mentioning the Trac ticket.

Yuras updated this revision to Diff 10498.Jan 16 2017, 6:48 AM
Yuras edited edge metadata.

Add a Note

Yuras marked an inline comment as done.Jan 16 2017, 6:51 AM

@simonpj My English writing skills are relatively poor, sorry. Please let me know if the Note is not clear enough.

bgamari requested changes to this revision.Jan 17 2017, 2:42 PM
bgamari edited edge metadata.
bgamari added inline comments.
docs/users_guide/using-warnings.rst
1036

Can you add :since: 8.2 here?

1037

Perhaps this instead,

Warn when a module provided by the package currently being compiled (i.e. the "home" package) is imported, but not explicitly listed in command line as a target.

Admittedly it's still far from perfect.

1040

Note that inline code is denoted by double-backtick in ReStructuredText. See https://downloads.haskell.org/~ghc/master/users-guide//editing-guide.html for a brief introduction to the markup.

utils/mkUserGuidePart/Options/Warnings.hs
453

Again, double-backtick.

This revision now requires changes to proceed.Jan 17 2017, 2:42 PM

Looks pretty good @Yuras. Just a few requests.

Yuras updated this revision to Diff 10526.Jan 18 2017, 3:57 AM
Yuras edited edge metadata.

Wording

Yuras updated this revision to Diff 10527.Jan 18 2017, 4:01 AM
Yuras edited edge metadata.

Formatting

Yuras marked 4 inline comments as done.Jan 18 2017, 4:02 AM
bgamari accepted this revision.Jan 18 2017, 1:43 PM
bgamari edited edge metadata.

Looks good to me. Thanks @Yuras

This revision was automatically updated to reflect the committed changes.