summary refs log tree commit diff stats
path: root/compiler/sem.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-05-28 17:12:44 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-05-28 17:12:51 +0200
commit0b84ee167b766ef3ecb2ba6374e32725ea1b2794 (patch)
tree013ff616ec63aaced584a1e7d44d3affacc4b5a9 /compiler/sem.nim
parentb479c947217409027ccb6bbdae738c8637161ff2 (diff)
downloadNim-0b84ee167b766ef3ecb2ba6374e32725ea1b2794.tar.gz
fixes #2159
Hints and warnings are only emitted for the main package that is compiled
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r--compiler/sem.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim
index 74fa09a57..a8ec2229f 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -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 =