You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/06/26 21:32:59 UTC

[royale-compiler] branch develop updated: compiler-jx: most console output during compilation is hidden and can be re-enabled with the -verbose option

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2ce996c  compiler-jx: most console output during compilation is hidden and can be re-enabled with the -verbose option
2ce996c is described below

commit 2ce996c782362c7d5c11ba84d363502305730462
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Jun 26 14:31:49 2019 -0700

    compiler-jx: most console output during compilation is hidden and can be re-enabled with the -verbose option
    
    This change adds a noticeable improvement to compile times. Compiling TourDeJewel takes 2 seconds less on my machine. Additionally, the classic Flex SDK and ASC 2.0 don't output all of that stuff, so it makes Royale more consistent with the rest of the ecosystem. Plus, the reduced noise makes errors and warnings seem more important, as they should be.
---
 .../apache/royale/compiler/clients/ASDOCJSC.java   |  5 ++-
 .../apache/royale/compiler/clients/COMPJSC.java    | 35 +++++++++++-----
 .../royale/compiler/clients/COMPJSCNative.java     | 25 ++++++++---
 .../royale/compiler/clients/COMPJSCRoyale.java     | 25 ++++++++---
 .../apache/royale/compiler/clients/MXMLJSC.java    |  5 ++-
 .../royale/compiler/clients/MXMLJSCNative.java     |  5 ++-
 .../royale/compiler/clients/MXMLJSCNode.java       |  5 ++-
 .../royale/compiler/clients/MXMLJSCRoyale.java     | 28 +++++++++----
 .../compiler/clients/MXMLJSCRoyaleCordova.java     |  5 ++-
 .../js/royale/JSRoyaleASDocDITAEmitter.java        | 33 +++++++++------
 .../codegen/js/royale/JSRoyaleASDocEmitter.java    | 41 ++++++++++++------
 .../codegen/mxml/royale/MXMLRoyaleEmitter.java     |  8 +++-
 .../codegen/mxml/royale/MXMLRoyalePublisher.java   | 41 ++++++++++++++----
 .../compiler/internal/graph/GoogDepsWriter.java    | 49 +++++++++++++++++-----
 .../compiler/utils/JSClosureCompilerWrapper.java   | 17 ++++++--
 15 files changed, 245 insertions(+), 82 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/ASDOCJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/ASDOCJSC.java
index d8c4601..133cfa0 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/ASDOCJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/ASDOCJSC.java
@@ -249,7 +249,10 @@ public class ASDOCJSC extends MXMLJSCRoyale
                         final File outputClassFile = getOutputClassFile(
                                 cu.getQualifiedNames().get(0), outputFolder);
 
-                        System.out.println("Compiling file: " + outputClassFile);
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Compiling file: " + outputClassFile);
+                        }
 
                         ICompilationUnit unit = cu;
 
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
index 1096235..501a734 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
@@ -188,9 +188,9 @@ public class COMPJSC extends MXMLJSC
 
             if (continueCompilation)
             {
-            	List<String> targets = config.getCompilerTargets();
-            	for (String target : targets)
-            		System.out.println("target:" + target);
+                List<String> targets = config.getCompilerTargets();
+                for (String target : targets)
+                    System.out.println("target:" + target);
             	targetloop:
             	for (String target : config.getCompilerTargets())
             	{
@@ -198,7 +198,7 @@ public class COMPJSC extends MXMLJSC
             		switch (JSTargetType.fromString(target))
 	                {
 	                case SWF:
-	                	System.out.println("COMPC");
+                        System.out.println("COMPC");
 	                    COMPC compc = new COMPC();
 	                    mxmlc = compc;
 	                    compc.configurationClass = JSGoogCompcConfiguration.class;
@@ -210,7 +210,7 @@ public class COMPJSC extends MXMLJSC
 	                    }
 	                    break;
 	                case JS_ROYALE:
-	                	System.out.println("COMPCJSCRoyale");
+                        System.out.println("COMPCJSCRoyale");
 	                	COMPJSCRoyale royale = new COMPJSCRoyale();
 	                	lastCompiler = royale;
 	                    result = royale.mainNoExit(removeASArgs(args), problems.getProblems(), false);
@@ -344,7 +344,10 @@ public class COMPJSC extends MXMLJSC
                         if (!entry.getName().contains("js/out") &&
                         	!entry.getName().contains(SWCReader.CATALOG_XML))
                         {
-                            System.out.println("Copy " + entry.getName());
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Copy " + entry.getName());
+                            }
                         	InputStream input = zipFile.getInputStream(entry);
                         	ZipEntry ze = new ZipEntry(entry.getName());
                         	ze.setMethod(ZipEntry.STORED);
@@ -405,7 +408,10 @@ public class COMPJSC extends MXMLJSC
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder, true);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
@@ -447,7 +453,10 @@ public class COMPJSC extends MXMLJSC
                     	}
                     	else
                     	{
-	                        System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+	                        if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+                            }
 	                    	
 	                        ICompilationUnit unit = cu;
 	
@@ -481,7 +490,10 @@ public class COMPJSC extends MXMLJSC
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
                     		outputClassFile = outputClassFile.replace('\\', '/');
-	                        System.out.println("Writing file: " + outputClassFile);     	
+	                        if (config.isVerbose())
+                            {
+                                System.out.println("Writing file: " + outputClassFile);     	
+                            }
 	                        long fileDate = System.currentTimeMillis();
 	                        long zipFileDate = fileDate;
 	                    	String metadataDate = targetSettings.getSWFMetadataDate();
@@ -538,7 +550,10 @@ public class COMPJSC extends MXMLJSC
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
-                                System.out.println("Writing file: " + sourceMapFile);
+                                if (config.isVerbose())
+                                {
+                                    System.out.println("Writing file: " + sourceMapFile);
+                                }
                                 ze = new ZipEntry(sourceMapFile);
     	                    	ze.setTime(zipFileDate);
     	                    	ze.setMethod(ZipEntry.STORED);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
index 8a13875..b38270a 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
@@ -203,7 +203,10 @@ public class COMPJSCNative extends MXMLJSCNative
                         if (!entry.getName().contains("js/out") &&
                         	!entry.getName().contains(SWCReader.CATALOG_XML))
                         {
-                            System.out.println("Copy " + entry.getName());
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Copy " + entry.getName());
+                            }
                         	InputStream input = zipFile.getInputStream(entry);
                         	zipOutputStream.putNextEntry(new ZipEntry(entry.getName()));
                         	IOUtils.copy(input, zipOutputStream);
@@ -258,7 +261,10 @@ public class COMPJSCNative extends MXMLJSCNative
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder, true);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
@@ -300,7 +306,10 @@ public class COMPJSCNative extends MXMLJSCNative
                     	}
                     	else
                     	{
-	                        System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+	                        if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+                            }
 	                    	
 	                        ICompilationUnit unit = cu;
 	
@@ -334,7 +343,10 @@ public class COMPJSCNative extends MXMLJSCNative
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
-	                        System.out.println("Writing file: " + outputClassFile);     	
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Writing file: " + outputClassFile);     	
+                            }
 	                        zipOutputStream.putNextEntry(new ZipEntry(outputClassFile));
 	                        temp.writeTo(zipOutputStream);
                             zipOutputStream.flush();
@@ -346,7 +358,10 @@ public class COMPJSCNative extends MXMLJSCNative
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
-                                System.out.println("Writing file: " + sourceMapFile);     	
+                                if (config.isVerbose())
+                                {
+                                    System.out.println("Writing file: " + sourceMapFile);
+                                }
                                 zipOutputStream.putNextEntry(new ZipEntry(sourceMapFile));
                                 sourceMapTemp.writeTo(zipOutputStream);
                                 zipOutputStream.flush();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
index 9c519cc..e531df9 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
@@ -207,7 +207,10 @@ public class COMPJSCRoyale extends MXMLJSCRoyale
                         if (!entry.getName().contains("js/out") &&
                         	!entry.getName().contains(SWCReader.CATALOG_XML))
                         {
-                            System.out.println("Copy " + entry.getName());
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Copy " + entry.getName());
+                            }
                         	InputStream input = zipFile.getInputStream(entry);
                         	ZipEntry ze = new ZipEntry(entry.getName());
                         	ze.setMethod(ZipEntry.STORED);
@@ -300,7 +303,10 @@ public class COMPJSCRoyale extends MXMLJSCRoyale
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder, true);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
@@ -341,7 +347,10 @@ public class COMPJSCRoyale extends MXMLJSCRoyale
                     	}
                     	else
                     	{
-	                        System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+	                        if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + cu.getQualifiedNames().get(0));
+                            }
 	                    	
 	                        ICompilationUnit unit = cu;
 	
@@ -377,7 +386,10 @@ public class COMPJSCRoyale extends MXMLJSCRoyale
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
                     		outputClassFile = outputClassFile.replace('\\', '/');
-	                        System.out.println("Writing file: " + outputClassFile);     	
+	                        if (config.isVerbose())
+                            {
+                                System.out.println("Writing file: " + outputClassFile);     	
+                            }
 	                        long fileDate = System.currentTimeMillis();
 	                        long zipFileDate = fileDate;
 	                    	String metadataDate = targetSettings.getSWFMetadataDate();
@@ -441,7 +453,10 @@ public class COMPJSCRoyale extends MXMLJSCRoyale
                                                                                   cu.getQualifiedNames().get(0),
                                                                                   isExterns ? externsOut : jsOut,
                                                                                   false).getPath();
-                                    System.out.println("Writing file: " + sourceMapFile);
+                                    if (config.isVerbose())
+                                    {
+                                        System.out.println("Writing file: " + sourceMapFile);
+                                    }
                                     ze = new ZipEntry(sourceMapFile);
                                     ze.setTime(zipFileDate);
                                     ze.setMethod(ZipEntry.STORED);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
index b2ced64..b8cb3fb 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
@@ -565,7 +565,10 @@ public class MXMLJSC implements JSCompilerEntryPoint, ProblemQueryProvider,
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 
 	                        ICompilationUnit unit = cu;
 	
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
index f56ba72..1c4474f 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
@@ -339,7 +339,10 @@ public class MXMLJSCNative implements JSCompilerEntryPoint, ProblemQueryProvider
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
index 19efb5b..bb83228 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
@@ -341,7 +341,10 @@ public class MXMLJSCNode implements JSCompilerEntryPoint, ProblemQueryProvider,
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
index 8dda1d4..fe7c209 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
@@ -378,8 +378,11 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint, ProblemQueryProvider
 	                    {
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder);
-	
-	                        System.out.println("Compiling file: " + outputClassFile);
+    
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
@@ -458,8 +461,11 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint, ProblemQueryProvider
     private void generateExternsReport(File externsReportFile,
 			List<ICompilationUnit> reachableCompilationUnits,
 			ProblemQuery problems) {
-    	
-        System.out.println("Generating externs report: " + externsReportFile.getAbsolutePath());
+        
+        if (config.isVerbose())
+        {
+            System.out.println("Generating externs report: " + externsReportFile.getAbsolutePath());
+        }
         
     	ArrayList<String> packageNames = new ArrayList<String>();
     	ArrayList<String> partNames = new ArrayList<String>();
@@ -652,8 +658,11 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint, ProblemQueryProvider
             	sb.append(" */\n");
                 sb.append(cdef.getQualifiedName() + " = function() {}\n");
             }
-    	}
-        System.out.println("Writing externs report: " + externsReportFile.getAbsolutePath());
+        }
+        if (config.isVerbose())
+        {
+            System.out.println("Writing externs report: " + externsReportFile.getAbsolutePath());
+        }
         FileWriter fw;
 		try {
 			fw = new FileWriter(externsReportFile, false);
@@ -783,8 +792,11 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint, ProblemQueryProvider
 			e.printStackTrace();
 		}
 		final File outputClassFile = getOutputClassFile(
-				bundleClassName, outputFolder);
-		System.out.println("Generating resource file: " + outputClassFile);
+                bundleClassName, outputFolder);
+        if (config.isVerbose())
+        {
+            System.out.println("Generating resource file: " + outputClassFile);
+        }
 		FileWriter fw;
 		try {
 			fw = new FileWriter(outputClassFile, false);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
index 6d23e64..378339c 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
@@ -344,7 +344,10 @@ public class MXMLJSCRoyaleCordova implements JSCompilerEntryPoint, ProblemQueryP
 	                        final File outputClassFile = getOutputClassFile(
 	                                cu.getQualifiedNames().get(0), outputFolder);
 	
-	                        System.out.println("Compiling file: " + outputClassFile);
+                            if (config.isVerbose())
+                            {
+                                System.out.println("Compiling file: " + outputClassFile);
+                            }
 	
 	                        ICompilationUnit unit = cu;
 	
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocDITAEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocDITAEmitter.java
index 2927115..c9a0863 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocDITAEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocDITAEmitter.java
@@ -1016,10 +1016,13 @@ public class JSRoyaleASDocDITAEmitter extends JSGoogEmitter implements IJSRoyale
     
     public void outputIndex(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "index.json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
-	out.write("{  \"index\": [");
-	System.out.println("Compiling file: " + indexFile);
+		final File indexFile = new File(outputFolder, "index.json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		out.write("{  \"index\": [");
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Set<String> keys = project.index.keySet();
     	List<String> keyList = new ArrayList<String>(keys);
     	Collections.sort(keyList);
@@ -1085,10 +1088,13 @@ public class JSRoyaleASDocDITAEmitter extends JSGoogEmitter implements IJSRoyale
 
     public void outputClasses(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "classes.json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
-	out.write("{  \"classes\": [");
-	System.out.println("Compiling file: " + indexFile);
+		final File indexFile = new File(outputFolder, "classes.json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		out.write("{  \"classes\": [");
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Set<String> keys = project.classes.keySet();
     	List<String> keyList = new ArrayList<String>(keys);
     	Collections.sort(keyList);
@@ -1123,10 +1129,13 @@ public class JSRoyaleASDocDITAEmitter extends JSGoogEmitter implements IJSRoyale
     
     public void outputTags(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "tags.json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
-	out.write("{  \"tags\": [");
-	System.out.println("Compiling file: " + indexFile);
+		final File indexFile = new File(outputFolder, "tags.json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		out.write("{  \"tags\": [");
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Collections.sort(project.tags);
     	boolean firstLine = true;
     	for (String tag : project.tags)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
index b0323d6..07c840a 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
@@ -843,10 +843,13 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter implements IJSRoyaleEmit
 
     public void outputIndex(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "index" + getMiddle(project) + ".json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
-	out.write("{  \"index\": [");
-	System.out.println("Compiling file: " + indexFile);
+		final File indexFile = new File(outputFolder, "index" + getMiddle(project) + ".json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		out.write("{  \"index\": [");
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Set<String> keys = project.index.keySet();
     	List<String> keyList = new ArrayList<String>(keys);
     	Collections.sort(keyList);
@@ -1034,10 +1037,13 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter implements IJSRoyaleEmit
 
     public void outputClasses(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "classes" + getMiddle(project) + ".json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		final File indexFile = new File(outputFolder, "classes" + getMiddle(project) + ".json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
         out.write("{  \"classes\": [");
-	System.out.println("Compiling file: " + indexFile);
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Set<String> keys = project.classes.keySet();
     	List<String> keyList = new ArrayList<String>(keys);
     	Collections.sort(keyList);
@@ -1097,7 +1103,10 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter implements IJSRoyaleEmit
 	    final File listFile = new File(outputFolder, "classlist" + getMiddle(project) + ".json");
 	    out = new BufferedWriter(new FileWriter(listFile));
 		out.write("{  \"classnames\": [");
-	    System.out.println("Compiling file: " + listFile);
+	    if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + listFile);
+		}
     	firstLine = true;
     	
     	for (String key : keyList)
@@ -1128,7 +1137,10 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter implements IJSRoyaleEmit
 			final File commentaryFile = new File(outputFolder, "commentary" + getMiddle(project) + ".json");
 			BufferedWriter commentaryWriter = new BufferedWriter(new FileWriter(commentaryFile));
 			commentaryWriter.write("{ \"list\": [");
-			System.out.println("Building commentary comparison file: "+commentaryFile);
+			if (project.config.isVerbose())
+			{
+				System.out.println("Building commentary comparison file: "+commentaryFile);
+			}
 			
 			firstLine = true;
 			int index = 0;
@@ -1159,10 +1171,13 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter implements IJSRoyaleEmit
     
     public void outputTags(File outputFolder, RoyaleASDocProject project) throws IOException
     {
-	final File indexFile = new File(outputFolder, "tags" + getMiddle(project) + ".json");
-	BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
-	out.write("{  \"tags\": [");
-	System.out.println("Compiling file: " + indexFile);
+		final File indexFile = new File(outputFolder, "tags" + getMiddle(project) + ".json");
+		BufferedWriter out = new BufferedWriter(new FileWriter(indexFile));
+		out.write("{  \"tags\": [");
+		if (project.config.isVerbose())
+		{
+			System.out.println("Compiling file: " + indexFile);
+		}
     	Collections.sort(project.tags);
     	boolean firstLine = true;
     	for (String tag : project.tags)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index 9918c72..9abdddf 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -183,8 +183,12 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
         {
         	asEmitterUsedNames.remove(usedName);
         }
-        System.out.println(currentClassName + " as: " + asEmitterUsedNames.toString());
-        System.out.println(currentClassName + " mxml: " + usedNames.toString());
+        RoyaleJSProject fjp = (RoyaleJSProject) getMXMLWalker().getProject();
+        if (fjp.config == null || fjp.config.isVerbose())
+        {
+            System.out.println(currentClassName + " as: " + asEmitterUsedNames.toString());
+            System.out.println(currentClassName + " mxml: " + usedNames.toString());
+        }
         usedNames.addAll(asEmitterUsedNames);
 
         boolean foundXML = false;
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 10a2211..80c6fba 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -187,11 +187,17 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         // The source directory is the source path entry containing the Main class.
         List<File> sourcePaths = project.getSourcePath();
         String targetFile = configuration.getTargetFile().toLowerCase();
-    	System.out.println("find project folder for " + targetFile);
+    	if (googConfiguration.isVerbose())
+        {
+            System.out.println("find project folder for " + targetFile);
+        }
         File imageSrcDir = null;
         for (File sp : sourcePaths)
         {
-        	System.out.println("checking source path " + sp.getAbsolutePath());
+        	if (googConfiguration.isVerbose())
+            {
+                System.out.println("checking source path " + sp.getAbsolutePath());
+            }
         	String lowercasePath = sp.getAbsolutePath().toLowerCase();
         	if (targetFile.startsWith(lowercasePath))
         		imageSrcDir = sp;
@@ -199,7 +205,10 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         if (imageSrcDir == null)
         {
         	imageSrcDir = new File(configuration.getTargetFile()).getAbsoluteFile().getParentFile();
-        	System.out.println("not found on source path, using parent file " + imageSrcDir.getAbsolutePath());
+        	if (googConfiguration.isVerbose())
+            {
+                System.out.println("not found on source path, using parent file " + imageSrcDir.getAbsolutePath());
+            }
         }
         final String projectName = FilenameUtils.getBaseName(configuration.getTargetFile());
         String qName = null;
@@ -395,7 +404,10 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
                         String code = IOUtils.toString(is, "UTF-8");
                         is.close();
                         JarSourceFile externFile = new JarSourceFile(key, code,true);
-                        System.out.println("using extern: " + key);
+                        if (googConfiguration.isVerbose())
+                        {
+                            System.out.println("using extern: " + key);
+                        }
                         compilerWrapper.addJSExternsFile(externFile);
 
                         // Write the extern into the filesystem.
@@ -432,11 +444,17 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         	return false; // some error occurred
         for (String file : fileList) {
             compilerWrapper.addJSSourceFile(file);
-            System.out.println("using source file: " + file);            
+            if (googConfiguration.isVerbose())
+            {            
+                System.out.println("using source file: " + file);
+            }
         }
         for (String file : sourceExternFiles) {
         	compilerWrapper.addJSExternsFile(file);
-            System.out.println("using extern file: " + file);            
+            if (googConfiguration.isVerbose())
+            {
+                System.out.println("using extern file: " + file);
+            }
         }
 
 
@@ -502,6 +520,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
             compilerWrapper.setOptions(projectReleaseMainFile.getCanonicalPath(), useStrictPublishing, !googConfiguration.getRemoveCirculars(), projectName);
             compilerWrapper.targetFilePath = projectReleaseMainFile.getCanonicalPath();
             compilerWrapper.setSourceMap(googConfiguration.getSourceMap());
+            compilerWrapper.setVerbose(googConfiguration.isVerbose());
 
             ok = compilerWrapper.compile();
 
@@ -527,7 +546,10 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
     		if ((sourceFile.getOriginalPath().endsWith("goog/deps.js") || sourceFile.getOriginalPath().endsWith("goog\\deps.js")) &&
         		!(sourceFile.getOriginalPath().endsWith("third_party/goog/deps.js") || sourceFile.getOriginalPath().endsWith("third_party\\goog\\deps.js")))
     			depsFile = sourceFile;
-    		System.out.println("originalPath: " + sourceFile.getOriginalPath());
+            if (googConfiguration.isVerbose())
+            {
+                System.out.println("originalPath: " + sourceFile.getOriginalPath());
+            }
     		fileMap.put(sourceFile.getOriginalPath(), sourceFile);
     	}
     	
@@ -564,7 +586,10 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         for (int i = n - 1; i >= 0; i--)
         {
         	String fileName = sortedFiles.get(i);
-        	System.out.println("sorted filename: " + fileName);
+        	if (googConfiguration.isVerbose())
+            {
+                System.out.println("sorted filename: " + fileName);
+            }
         	if (seen.contains(fileName)) 
         		continue;
         	seen.add(fileName);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
index 6e29953..8ddcff8 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
@@ -70,11 +70,15 @@ public class GoogDepsWriter {
 		removeCirculars = config.getRemoveCirculars();
 		sourceMaps = config.getSourceMap();
 		otherPaths = config.getSDKJSLib();
+		verbose = config.isVerbose();
 		otherPaths.add(new File(outputFolder.getParent(), "royale/Royale/src").getPath());
 		this.swcs = swcs;
-		for (ISWC swc : swcs)
+		if (verbose)
 		{
-			System.out.println("using SWC: " + swc.getSWCFile().getAbsolutePath());
+			for (ISWC swc : swcs)
+			{
+				System.out.println("using SWC: " + swc.getSWCFile().getAbsolutePath());
+			}
 		}
 	}
 	
@@ -86,6 +90,7 @@ public class GoogDepsWriter {
 	private List<ISWC> swcs;
 	private boolean removeCirculars = false;
 	private boolean sourceMaps = false;
+	private boolean verbose = false;
 	private ArrayList<GoogDep> dps;
 	private DependencyGraph graph;
 	private CompilerProject project;
@@ -336,7 +341,10 @@ public class GoogDepsWriter {
 							&& !dep.equals(staticOwner))
 					{
 						ownerInfo.fileInfo.staticDeps.add(dep);
-						System.out.println(staticClass + " used in static initializer of " + staticOwner + " so make " + dep + " a static dependency");
+						if (verbose)
+						{
+							System.out.println(staticClass + " used in static initializer of " + staticOwner + " so make " + dep + " a static dependency");
+						}
 						// all things added here should get added to graph in sortFunction
 					}
 				}
@@ -416,7 +424,10 @@ public class GoogDepsWriter {
 		
 		if (removeCirculars)
 			removeRequires(current);
-        System.out.println("Dependencies calculated for '" + current.className + "'");
+		if (verbose)
+		{
+			System.out.println("Dependencies calculated for '" + current.className + "'");
+		}
 
 		ICompilationUnit unit = null;
 		
@@ -454,7 +465,10 @@ public class GoogDepsWriter {
 								requireMap.put(className, base);
 								requireMap2.put(base, className);
 							}
-							System.out.println(current.className + " depends on " + className);
+							if (verbose)
+							{
+								System.out.println(current.className + " depends on " + className);
+							}
 							graph.addDependency(unit, base, DependencyType.INHERITANCE);
 						}
 						if (!visited.containsKey(className))
@@ -479,7 +493,10 @@ public class GoogDepsWriter {
 						requireMap.put(staticDep, base);
 						requireMap2.put(base, staticDep);
 					}
-					System.out.println(current.className + " static initialization depends on " + staticDep);
+					if (verbose)
+					{
+						System.out.println(current.className + " static initialization depends on " + staticDep);
+					}
 					graph.addDependency(unit, base, DependencyType.INHERITANCE);
 				}
 			}
@@ -706,7 +723,10 @@ public class GoogDepsWriter {
                         	// don't remove the require if some class needs it at static initialization
                         	// time
 //                        	suppressCount++;
-                        	System.out.println(gd.filePath + " removing require: " + s);
+							if (verbose)
+							{
+								System.out.println(gd.filePath + " removing require: " + s);
+							}
                     		if (!firstDependency)
                     			sb.append(",");
                     		sb.append(s);
@@ -738,7 +758,10 @@ public class GoogDepsWriter {
             			line += "('" + dep + "');";
             			finalLines.add(lastRequireLine++, line);
 						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, new File(gd.filePath).getName(), lastRequireLine);
-            			System.out.println("adding require for static dependency " + dep + " to " + className);
+            			if (verbose)
+						{
+							System.out.println("adding require for static dependency " + dep + " to " + className);
+						}
             		}
             	}
             }
@@ -1260,7 +1283,10 @@ public class GoogDepsWriter {
 									        File.separator + assetFileName);
 							        FileUtils.copyFile(assetFile, destFile);
 
-							        System.out.println("Copied assets of the '" + nameOfClass + "' class");
+							        if (verbose)
+									{
+										System.out.println("Copied assets of the '" + nameOfClass + "' class");
+									}
 						        }
 					        }
     				    }
@@ -1339,7 +1365,10 @@ public class GoogDepsWriter {
     		    				inStream.close();
     		    				outStream.flush();
     		    				outStream.close();
-						        System.out.println("Copied asset " + assetName);
+						        if (verbose)
+								{
+									System.out.println("Copied asset " + assetName);
+								}
     						}
     					}
     				}
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index 8d8ace0..47df6d8 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -90,6 +90,7 @@ public class JSClosureCompilerWrapper
     private String propertyMapInputPath;
     private boolean skipTypeInference;
     private boolean sourceMap = false;
+    private boolean verbose = false;
     
     public String targetFilePath;
     
@@ -117,13 +118,21 @@ public class JSClosureCompilerWrapper
     {
         sourceMap = enabled;
     }
+
+    public void setVerbose(boolean enabled)
+    {
+        verbose = enabled;
+    }
     
     public boolean compile()
     {
-    	System.out.println("list of source files");
-    	for (SourceFile file : jsSourceFiles_)
-    		System.out.println(file.getName());
-    	System.out.println("end of list of source files");
+        if (verbose)
+        {
+            System.out.println("list of source files");
+            for (SourceFile file : jsSourceFiles_)
+                System.out.println(file.getName());
+            System.out.println("end of list of source files");
+        }
     	File outputFolder = new File(targetFilePath).getParentFile();
         if (variableMapInputPath != null)
         {