diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2016-10-19 14:32:38 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2016-10-19 15:57:13 +0200 |
commit | 413e9c12caf10710a4f41d8db43973f0f75a2345 (patch) | |
tree | 2fc571ac39197edcfbfc552b7aa7bc90fb1936f3 | |
parent | 156f7329c4f93a9c2d63785f50a5ca62d097278e (diff) | |
download | scala-413e9c12caf10710a4f41d8db43973f0f75a2345.tar.gz scala-413e9c12caf10710a4f41d8db43973f0f75a2345.tar.bz2 scala-413e9c12caf10710a4f41d8db43973f0f75a2345.zip |
Replace println with log calls in BrowsingLoaders
This alternative symbol loader is used in the presentation compiler and
may generate output even when the compiler should be silent.
See SI-8717 for more context, even though this does not really
fix the ticket.
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala | 8 | ||||
-rw-r--r-- | test/files/presentation/t8085.check | 1 | ||||
-rw-r--r-- | test/files/presentation/t8085b.check | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala index c2d0f5ccec..d3c7ba4d76 100644 --- a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala +++ b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala @@ -87,16 +87,16 @@ abstract class BrowsingLoaders extends GlobalSymbolLoaders { if (packagePrefix == root.fullName) { enterClass(root, name.toString, new SourcefileLoader(src)) entered += 1 - } else println("prefixes differ: "+packagePrefix+","+root.fullName) + } else log("prefixes differ: "+packagePrefix+","+root.fullName) case ModuleDef(_, name, _) => if (packagePrefix == root.fullName) { val module = enterModule(root, name.toString, new SourcefileLoader(src)) entered += 1 if (name == nme.PACKAGEkw) { - println("open package module: "+module) + log("open package module: "+module) openPackageModule(module, root) } - } else println("prefixes differ: "+packagePrefix+","+root.fullName) + } else log("prefixes differ: "+packagePrefix+","+root.fullName) case _ => } } @@ -121,7 +121,7 @@ abstract class BrowsingLoaders extends GlobalSymbolLoaders { browseTopLevel(root, src) } catch { case ex: syntaxAnalyzer.MalformedInput => - println("[%s] caught malformed input exception at offset %d: %s".format(src, ex.offset, ex.msg)) + log(s"[$src] caught malformed input exception at offset ${ex.offset}: ${ex.msg}") super.enterToplevelsFromSource(root, name, src) } } diff --git a/test/files/presentation/t8085.check b/test/files/presentation/t8085.check index 921ca7528b..0e85de45f9 100644 --- a/test/files/presentation/t8085.check +++ b/test/files/presentation/t8085.check @@ -1,3 +1,2 @@ reload: NodeScalaSuite.scala -open package module: package object nodescala Test OK diff --git a/test/files/presentation/t8085b.check b/test/files/presentation/t8085b.check index 921ca7528b..0e85de45f9 100644 --- a/test/files/presentation/t8085b.check +++ b/test/files/presentation/t8085b.check @@ -1,3 +1,2 @@ reload: NodeScalaSuite.scala -open package module: package object nodescala Test OK |