[gwt-contrib] Change in gwt[master]: Attempt to continue after the JDT compiler aborts.

2013-03-21 Thread Brian Slesinsky

Brian Slesinsky has abandoned this change.

Change subject: Attempt to continue after the JDT compiler aborts.
..


Abandoned

Submitted.

--
To view, visit https://gwt-review.googlesource.com/2271
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Matthew Dempsky mdemp...@google.com

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups Google Web Toolkit Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Attempt to continue after the JDT compiler aborts.

2013-03-20 Thread Matthew Dempsky

Matthew Dempsky has posted comments on this change.

Change subject: Attempt to continue after the JDT compiler aborts.
..


Patch Set 1: Code-Review+1

--
To view, visit https://gwt-review.googlesource.com/2271
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Matthew Dempsky mdemp...@google.com
Gerrit-HasComments: No

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups Google Web Toolkit Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Attempt to continue after the JDT compiler aborts.

2013-03-18 Thread Brian Slesinsky

Brian Slesinsky has uploaded a new change for review.

  https://gwt-review.googlesource.com/2271


Change subject: Attempt to continue after the JDT compiler aborts.
..

Attempt to continue after the JDT compiler aborts.

This could occasionally work, but in my test case it just causes a
RuntimeException later due to violating an internal JDT invariant. Still, it
lets us print the names of a few more source files of death before dying.

Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c
---
M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
1 file changed, 23 insertions(+), 6 deletions(-)



diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java  
b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java

index 05c038c..dfc37e0 100644
--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -226,11 +226,14 @@
   }

   private class CompilerImpl extends Compiler {
+private TreeLogger logger;
+private int abortCount = 0;

-public CompilerImpl() {
+public CompilerImpl(TreeLogger logger) {
   super(new INameEnvironmentImpl(),  
DefaultErrorHandlingPolicies.proceedWithAllProblems(),
   getCompilerOptions(), new ICompilerRequestorImpl(), new  
DefaultProblemFactory(

   Locale.getDefault()));
+  this.logger = logger;
 }

 /**
@@ -248,7 +251,19 @@

 @Override
 public void process(CompilationUnitDeclaration cud, int i) {
-  super.process(cud, i);
+  try {
+super.process(cud, i);
+  } catch (AbortCompilation e) {
+abortCount++;
+String filename = new String(cud.getFileName());
+logger.log(TreeLogger.Type.ERROR,
+JDT aborted:  + filename + :  + e.problem.getMessage());
+return; // continue without it; it might be a server-side class.
+  } catch (RuntimeException e) {
+logger.log(TreeLogger.Type.ERROR,
+JDT died after  + abortCount +  previous errors, e);
+throw new AbortCompilation(cud.compilationResult, e);
+  }
   ClassFile[] classFiles = cud.compilationResult().getClassFiles();
   MapClassFile, CompiledClass results = new LinkedHashMapClassFile,  
CompiledClass();

   for (ClassFile classFile : classFiles) {
@@ -739,17 +754,19 @@
   icus.add(new Adapter(builder));
 }

-compilerImpl = new CompilerImpl();
+compilerImpl = new CompilerImpl(logger);
 try {
   compilerImpl.compile(icus.toArray(new  
ICompilationUnit[icus.size()]));

 } catch (AbortCompilation e) {
-  if (e.problem.getOriginatingFileName() != null) {
+  if (e.problem == null) {
+logger.log(TreeLogger.Type.ERROR, JDT compiler aborted);
+  } else if (e.problem.getOriginatingFileName() == null) {
+logger.log(TreeLogger.Type.ERROR, JDT compiler aborted:  +  
e.problem.getMessage());

+  } else {
 String filename = new String(e.problem.getOriginatingFileName());
 TreeLogger branch = logger.branch(TreeLogger.Type.ERROR,
 At  + filename + :  + e.problem.getSourceLineNumber());
 branch.log(TreeLogger.Type.ERROR, JDT compiler aborted:  +  
e.problem.getMessage());

-  } else {
-logger.log(TreeLogger.Type.ERROR, JDT compiler aborted:  +  
e.problem.getMessage());

   }
   throw new UnableToCompleteException();
 } finally {

--
To view, visit https://gwt-review.googlesource.com/2271
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Brian Slesinsky skybr...@google.com

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups Google Web Toolkit Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.