Hints and warnings are only emitted for the main package that is compiled
This commit is contained in:
Andreas Rumpf 2016-05-28 17:12:44 +02:00
commit 0b84ee167b
4 changed files with 18 additions and 1 deletions

View file

@ -413,6 +413,12 @@ proc myOpen(module: PSym): PPassContext =
c.importTable.addSym magicsys.systemModule # import the "System" identifier
importAllSymbols(c, magicsys.systemModule)
c.topLevelScope = openScope(c)
# don't be verbose unless the module belongs to the main package:
if module.owner.id == gMainPackageId:
gNotes = gMainPackageNotes
else:
if gMainPackageNotes == {}: gMainPackageNotes = gNotes
gNotes = ForeignPackageNotes
result = c
proc myOpenCached(module: PSym, rd: PRodReader): PPassContext =