From 49a978cb51acb6b0f30a249a5348cfcf06e67719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 9 Oct 2023 00:41:21 +0200 Subject: [PATCH 1/3] Use standalone Java compiler https://github.com/kohlschutter/jdk.compiler.standalone --- transpiler/pom.xml | 5 + .../AsyncAwaitPropagationScanner.java | 10 +- .../org/jsweet/transpiler/ConstAnalyzer.java | 16 +-- .../GlobalBeforeTranslationScanner.java | 18 +-- .../org/jsweet/transpiler/JSweetContext.java | 28 ++--- .../org/jsweet/transpiler/JSweetFactory.java | 2 +- .../jsweet/transpiler/JSweetTranspiler.java | 4 +- .../transpiler/Java2TypeScriptTranslator.java | 108 +++++++++--------- .../transpiler/JavaCompilationComponents.java | 7 +- .../jsweet/transpiler/OverloadScanner.java | 22 ++-- .../org/jsweet/transpiler/SourcePosition.java | 2 +- .../StaticInitilializerAnalyzer.java | 18 +-- .../org/jsweet/transpiler/TypeChecker.java | 14 +-- .../org/jsweet/transpiler/eval/JavaEval.java | 2 +- .../extension/Java2TypeScriptAdapter.java | 22 ++-- .../transpiler/extension/PrinterAdapter.java | 6 +- .../RemoveJavaDependenciesAdapter.java | 8 +- .../RemoveJavaDependenciesES6Adapter.java | 2 +- .../model/ExtendedElementFactory.java | 38 +++--- .../support/ArrayAccessElementSupport.java | 2 +- .../support/AssignmentElementSupport.java | 2 +- .../AssignmentWithOperatorElementSupport.java | 2 +- .../support/BinaryOperatorElementSupport.java | 2 +- .../model/support/CaseElementSupport.java | 2 +- .../CompilationUnitElementSupport.java | 2 +- .../support/ExecutableElementSupport.java | 2 +- .../model/support/ExtendedElementSupport.java | 6 +- .../support/ForeachLoopElementSupport.java | 18 +-- .../support/IdentifierElementSupport.java | 2 +- .../model/support/ImportElementSupport.java | 4 +- .../model/support/LiteralElementSupport.java | 2 +- .../MethodInvocationElementSupport.java | 8 +- .../model/support/NewArrayElementSupport.java | 2 +- .../model/support/NewClassElementSupport.java | 2 +- .../model/support/TypeCastElementSupport.java | 2 +- .../model/support/TypeElementSupport.java | 2 +- .../support/UnaryOperatorElementSupport.java | 2 +- .../support/VariableAccessElementSupport.java | 4 +- .../model/support/VariableElementSupport.java | 2 +- .../transpiler/util/AbstractTreePrinter.java | 18 +-- .../transpiler/util/AbstractTreeScanner.java | 16 +-- .../org/jsweet/transpiler/util/JSDoc.java | 14 +-- .../transpiler/util/MainMethodFinder.java | 6 +- .../transpiler/util/ReferenceGrabber.java | 10 +- .../transpiler/util/RollbackException.java | 2 +- .../java/org/jsweet/transpiler/util/Util.java | 100 ++++++++-------- .../jsweet/test/transpiler/AbstractTest.java | 6 +- .../transpiler/util/ExecutionPathTest.java | 26 ++--- .../jsweet/test/transpiler/util/UtilTest.java | 14 +-- 49 files changed, 310 insertions(+), 304 deletions(-) diff --git a/transpiler/pom.xml b/transpiler/pom.xml index 072b069e2..d9f1c3cff 100644 --- a/transpiler/pom.xml +++ b/transpiler/pom.xml @@ -195,6 +195,11 @@ + + com.kohlschutter.jdk.compiler + standalone-jdk11 + 1.0.0-SNAPSHOT + org.apache.commons commons-lang3 diff --git a/transpiler/src/main/java/org/jsweet/transpiler/AsyncAwaitPropagationScanner.java b/transpiler/src/main/java/org/jsweet/transpiler/AsyncAwaitPropagationScanner.java index 6d577d99c..dd8a3b664 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/AsyncAwaitPropagationScanner.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/AsyncAwaitPropagationScanner.java @@ -31,11 +31,11 @@ import org.jsweet.transpiler.util.AbstractTreeScanner; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.Tree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.util.Trees; /** * This AST scanner performs propagates async methods automatically. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/ConstAnalyzer.java b/transpiler/src/main/java/org/jsweet/transpiler/ConstAnalyzer.java index d4e42b326..65441f279 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/ConstAnalyzer.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/ConstAnalyzer.java @@ -28,14 +28,14 @@ import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ArrayAccessTree; -import com.sun.source.tree.AssignmentTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.CompoundAssignmentTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.UnaryTree; -import com.sun.source.util.TreeScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.ArrayAccessTree; +import standalone.com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.UnaryTree; +import standalone.com.sun.source.util.TreeScanner; +import standalone.com.sun.source.util.Trees; /** * This AST scanner analyzes local variables to determine if they are locally diff --git a/transpiler/src/main/java/org/jsweet/transpiler/GlobalBeforeTranslationScanner.java b/transpiler/src/main/java/org/jsweet/transpiler/GlobalBeforeTranslationScanner.java index 52830f4b6..f10805f9c 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/GlobalBeforeTranslationScanner.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/GlobalBeforeTranslationScanner.java @@ -38,15 +38,15 @@ import org.jsweet.transpiler.util.AbstractTreeScanner; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.LiteralTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; -import com.sun.source.tree.WildcardTree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.WildcardTree; +import standalone.com.sun.source.util.Trees; /** * This AST scanner performs global analysis and fills up the context with diff --git a/transpiler/src/main/java/org/jsweet/transpiler/JSweetContext.java b/transpiler/src/main/java/org/jsweet/transpiler/JSweetContext.java index 7b90a1abd..4d990dae3 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/JSweetContext.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/JSweetContext.java @@ -69,20 +69,20 @@ import org.jsweet.transpiler.util.DirectedGraph; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.AssignmentTree; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ExpressionStatementTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.StatementTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; -import com.sun.source.tree.WildcardTree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ExpressionStatementTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.StatementTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.WildcardTree; +import standalone.com.sun.source.util.Trees; /** * The transpiler context, which is an extension of the Java compiler context. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/JSweetFactory.java b/transpiler/src/main/java/org/jsweet/transpiler/JSweetFactory.java index 24ca58f67..c087cbb42 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/JSweetFactory.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/JSweetFactory.java @@ -9,7 +9,7 @@ import org.jsweet.transpiler.extension.PrinterAdapter; import org.jsweet.transpiler.extension.RemoveJavaDependenciesAdapter; -import com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompilationUnitTree; /** * The factory object is the one creating instances for key JSweet transpilation diff --git a/transpiler/src/main/java/org/jsweet/transpiler/JSweetTranspiler.java b/transpiler/src/main/java/org/jsweet/transpiler/JSweetTranspiler.java index cbd272a9b..00cd1eb18 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/JSweetTranspiler.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/JSweetTranspiler.java @@ -87,8 +87,8 @@ import com.google.debugging.sourcemap.SourceMapGeneratorV3; import com.google.debugging.sourcemap.SourceMapping; import com.google.gson.Gson; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.Tree; /** * The actual JSweet transpiler. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/Java2TypeScriptTranslator.java b/transpiler/src/main/java/org/jsweet/transpiler/Java2TypeScriptTranslator.java index 94a8d9ee8..bd0d836e0 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/Java2TypeScriptTranslator.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/Java2TypeScriptTranslator.java @@ -88,60 +88,60 @@ import org.jsweet.transpiler.util.JSDoc; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.AnnotationTree; -import com.sun.source.tree.ArrayAccessTree; -import com.sun.source.tree.ArrayTypeTree; -import com.sun.source.tree.AssertTree; -import com.sun.source.tree.AssignmentTree; -import com.sun.source.tree.BinaryTree; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.BreakTree; -import com.sun.source.tree.CaseTree; -import com.sun.source.tree.CatchTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.CompoundAssignmentTree; -import com.sun.source.tree.ConditionalExpressionTree; -import com.sun.source.tree.ContinueTree; -import com.sun.source.tree.DoWhileLoopTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.tree.ExpressionStatementTree; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.ForLoopTree; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.IfTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.InstanceOfTree; -import com.sun.source.tree.IntersectionTypeTree; -import com.sun.source.tree.LabeledStatementTree; -import com.sun.source.tree.LambdaExpressionTree; -import com.sun.source.tree.LiteralTree; -import com.sun.source.tree.MemberReferenceTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.NewArrayTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.ParameterizedTypeTree; -import com.sun.source.tree.ParenthesizedTree; -import com.sun.source.tree.PrimitiveTypeTree; -import com.sun.source.tree.ReturnTree; -import com.sun.source.tree.StatementTree; -import com.sun.source.tree.SwitchTree; -import com.sun.source.tree.SynchronizedTree; -import com.sun.source.tree.ThrowTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.Tree.Kind; -import com.sun.source.tree.TryTree; -import com.sun.source.tree.TypeCastTree; -import com.sun.source.tree.TypeParameterTree; -import com.sun.source.tree.UnaryTree; -import com.sun.source.tree.VariableTree; -import com.sun.source.tree.WhileLoopTree; -import com.sun.source.tree.WildcardTree; -import com.sun.source.util.TreePath; -import com.sun.source.util.TreeScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.AnnotationTree; +import standalone.com.sun.source.tree.ArrayAccessTree; +import standalone.com.sun.source.tree.ArrayTypeTree; +import standalone.com.sun.source.tree.AssertTree; +import standalone.com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.BreakTree; +import standalone.com.sun.source.tree.CaseTree; +import standalone.com.sun.source.tree.CatchTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.ConditionalExpressionTree; +import standalone.com.sun.source.tree.ContinueTree; +import standalone.com.sun.source.tree.DoWhileLoopTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.ExpressionStatementTree; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.ForLoopTree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.IfTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.InstanceOfTree; +import standalone.com.sun.source.tree.IntersectionTypeTree; +import standalone.com.sun.source.tree.LabeledStatementTree; +import standalone.com.sun.source.tree.LambdaExpressionTree; +import standalone.com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.MemberReferenceTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.NewArrayTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.ParameterizedTypeTree; +import standalone.com.sun.source.tree.ParenthesizedTree; +import standalone.com.sun.source.tree.PrimitiveTypeTree; +import standalone.com.sun.source.tree.ReturnTree; +import standalone.com.sun.source.tree.StatementTree; +import standalone.com.sun.source.tree.SwitchTree; +import standalone.com.sun.source.tree.SynchronizedTree; +import standalone.com.sun.source.tree.ThrowTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree.Kind; +import standalone.com.sun.source.tree.TryTree; +import standalone.com.sun.source.tree.TypeCastTree; +import standalone.com.sun.source.tree.TypeParameterTree; +import standalone.com.sun.source.tree.UnaryTree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.WhileLoopTree; +import standalone.com.sun.source.tree.WildcardTree; +import standalone.com.sun.source.util.TreePath; +import standalone.com.sun.source.util.TreeScanner; +import standalone.com.sun.source.util.Trees; /** * This is a TypeScript printer for translating the Java AST to a TypeScript diff --git a/transpiler/src/main/java/org/jsweet/transpiler/JavaCompilationComponents.java b/transpiler/src/main/java/org/jsweet/transpiler/JavaCompilationComponents.java index 0593bc6fa..46ee6de58 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/JavaCompilationComponents.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/JavaCompilationComponents.java @@ -14,15 +14,16 @@ import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; -import javax.tools.ToolProvider; import org.apache.log4j.Logger; import org.jsweet.JSweetConfig; import org.jsweet.transpiler.util.ConsoleTranspilationHandler; import org.jsweet.transpiler.util.Util; -import com.sun.source.util.JavacTask; -import com.sun.source.util.Trees; +import com.kohlschutter.jdk.standaloneutil.ToolProvider; + +import standalone.com.sun.source.util.JavacTask; +import standalone.com.sun.source.util.Trees; public class JavaCompilationComponents implements AutoCloseable { diff --git a/transpiler/src/main/java/org/jsweet/transpiler/OverloadScanner.java b/transpiler/src/main/java/org/jsweet/transpiler/OverloadScanner.java index 592007630..7e8d82319 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/OverloadScanner.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/OverloadScanner.java @@ -39,17 +39,17 @@ import org.jsweet.transpiler.util.AbstractTreeScanner; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ExpressionStatementTree; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.ReturnTree; -import com.sun.source.tree.StatementTree; -import com.sun.source.tree.Tree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ExpressionStatementTree; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.ReturnTree; +import standalone.com.sun.source.tree.StatementTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.util.Trees; /** * This AST scanner detects method overloads and gather them into diff --git a/transpiler/src/main/java/org/jsweet/transpiler/SourcePosition.java b/transpiler/src/main/java/org/jsweet/transpiler/SourcePosition.java index add6de2e4..8f3d11521 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/SourcePosition.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/SourcePosition.java @@ -22,7 +22,7 @@ import org.jsweet.transpiler.util.Position; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree; /** * A non-mutable position in a source file. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/StaticInitilializerAnalyzer.java b/transpiler/src/main/java/org/jsweet/transpiler/StaticInitilializerAnalyzer.java index 48c6d6bbd..509f482f5 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/StaticInitilializerAnalyzer.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/StaticInitilializerAnalyzer.java @@ -36,15 +36,15 @@ import org.jsweet.transpiler.util.ReferenceGrabber; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.PackageTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; -import com.sun.source.util.TreePathScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.PackageTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.util.TreePathScanner; +import standalone.com.sun.source.util.Trees; /** * This AST scanner creates a class dependency graph for each package, based on diff --git a/transpiler/src/main/java/org/jsweet/transpiler/TypeChecker.java b/transpiler/src/main/java/org/jsweet/transpiler/TypeChecker.java index d06df7f50..0d22d9029 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/TypeChecker.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/TypeChecker.java @@ -33,13 +33,13 @@ import org.jsweet.transpiler.util.AbstractTreePrinter; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ArrayTypeTree; -import com.sun.source.tree.AssignmentTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.ArrayTypeTree; +import standalone.com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; /** * This helper class performs extra type checking for the JSweet transpiler diff --git a/transpiler/src/main/java/org/jsweet/transpiler/eval/JavaEval.java b/transpiler/src/main/java/org/jsweet/transpiler/eval/JavaEval.java index 5b0a8c9bd..7290a04d5 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/eval/JavaEval.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/eval/JavaEval.java @@ -16,7 +16,7 @@ import org.jsweet.transpiler.util.MainMethodFinder; import org.jsweet.transpiler.util.MainMethodFinder.MainMethodFoundSignal; -import com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompilationUnitTree; public class JavaEval extends RuntimeEval { diff --git a/transpiler/src/main/java/org/jsweet/transpiler/extension/Java2TypeScriptAdapter.java b/transpiler/src/main/java/org/jsweet/transpiler/extension/Java2TypeScriptAdapter.java index 13f42a10f..02c98dda7 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/extension/Java2TypeScriptAdapter.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/extension/Java2TypeScriptAdapter.java @@ -103,17 +103,17 @@ import org.jsweet.transpiler.model.support.MethodInvocationElementSupport; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.ParameterizedTypeTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.TypeCastTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.ParameterizedTypeTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.TypeCastTree; /** * This is an adapter for the TypeScript code generator. It overrides the diff --git a/transpiler/src/main/java/org/jsweet/transpiler/extension/PrinterAdapter.java b/transpiler/src/main/java/org/jsweet/transpiler/extension/PrinterAdapter.java index f4e918de7..d85cca574 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/extension/PrinterAdapter.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/extension/PrinterAdapter.java @@ -71,9 +71,9 @@ import org.jsweet.transpiler.util.AbstractTreePrinter; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.Tree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.util.Trees; /** * A printer adapter, which can be overridden to change the default printer diff --git a/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesAdapter.java b/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesAdapter.java index a00d59723..6b5bd2e0a 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesAdapter.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesAdapter.java @@ -57,10 +57,10 @@ import org.jsweet.transpiler.model.VariableAccessElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.BinaryTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.tree.LiteralTree; -import com.sun.source.tree.ParameterizedTypeTree; +import standalone.com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.ParameterizedTypeTree; /** * An adapter that removes many uses of Java APIs and replace them with diff --git a/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesES6Adapter.java b/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesES6Adapter.java index b5f2f8655..f8dcb4fb8 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesES6Adapter.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/extension/RemoveJavaDependenciesES6Adapter.java @@ -42,7 +42,7 @@ import org.jsweet.transpiler.model.support.ForeachLoopElementSupport; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; /** * An adapter that removes many uses of Java APIs and replace them with diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/ExtendedElementFactory.java b/transpiler/src/main/java/org/jsweet/transpiler/model/ExtendedElementFactory.java index 224568ef3..7abe5d1fe 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/ExtendedElementFactory.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/ExtendedElementFactory.java @@ -41,25 +41,25 @@ import org.jsweet.transpiler.model.support.VariableElementSupport; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ArrayAccessTree; -import com.sun.source.tree.AssignmentTree; -import com.sun.source.tree.BinaryTree; -import com.sun.source.tree.CaseTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.CompoundAssignmentTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.LiteralTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.NewArrayTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.TypeCastTree; -import com.sun.source.tree.UnaryTree; -import com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.ArrayAccessTree; +import standalone.com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.CaseTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.NewArrayTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.TypeCastTree; +import standalone.com.sun.source.tree.UnaryTree; +import standalone.com.sun.source.tree.VariableTree; /** * A factory to create extended elements. It defines an overloaded create method diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ArrayAccessElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ArrayAccessElementSupport.java index f5a4eb581..75cdb1401 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ArrayAccessElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ArrayAccessElementSupport.java @@ -21,7 +21,7 @@ import org.jsweet.transpiler.model.ArrayAccessElement; import org.jsweet.transpiler.model.ExtendedElement; -import com.sun.source.tree.ArrayAccessTree; +import standalone.com.sun.source.tree.ArrayAccessTree; /** * See {@link ArrayAccessElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentElementSupport.java index 7c12cb3a8..201b01eec 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentElementSupport.java @@ -22,7 +22,7 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.VariableAccessElement; -import com.sun.source.tree.AssignmentTree; +import standalone.com.sun.source.tree.AssignmentTree; /** * See {@link AssignmentElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentWithOperatorElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentWithOperatorElementSupport.java index 61fa3045d..5a1c3492b 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentWithOperatorElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/AssignmentWithOperatorElementSupport.java @@ -23,7 +23,7 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.VariableAccessElement; -import com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; /** * See {@link AssignmentWithOperatorElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/BinaryOperatorElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/BinaryOperatorElementSupport.java index 14edc24e9..e0be8134f 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/BinaryOperatorElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/BinaryOperatorElementSupport.java @@ -22,7 +22,7 @@ import org.jsweet.transpiler.model.BinaryOperatorElement; import org.jsweet.transpiler.model.ExtendedElement; -import com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.BinaryTree; /** * See {@link BinaryOperatorElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/CaseElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/CaseElementSupport.java index 9346b4126..702b9d5d8 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/CaseElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/CaseElementSupport.java @@ -20,7 +20,7 @@ import org.jsweet.transpiler.model.CaseElement; -import com.sun.source.tree.CaseTree; +import standalone.com.sun.source.tree.CaseTree; /** * See {@link CaseElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/CompilationUnitElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/CompilationUnitElementSupport.java index bed931f3f..d28f13763 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/CompilationUnitElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/CompilationUnitElementSupport.java @@ -23,7 +23,7 @@ import org.jsweet.transpiler.model.CompilationUnitElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompilationUnitTree; /** * See {@link CompilationUnitElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExecutableElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExecutableElementSupport.java index 175136668..9c3348b10 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExecutableElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExecutableElementSupport.java @@ -18,7 +18,7 @@ import org.jsweet.transpiler.model.ExecutableElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.MethodTree; public class ExecutableElementSupport extends ExtendedElementSupport implements ExecutableElement { diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExtendedElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExtendedElementSupport.java index 1ff953536..66bfad43d 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExtendedElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ExtendedElementSupport.java @@ -29,9 +29,9 @@ import org.jsweet.transpiler.model.ExtendedElementFactory; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.Tree.Kind; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree.Kind; /** * See {@link ExtendedElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ForeachLoopElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ForeachLoopElementSupport.java index 8544b0043..d77e28e30 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ForeachLoopElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ForeachLoopElementSupport.java @@ -26,10 +26,10 @@ import org.jsweet.transpiler.model.ForeachLoopElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.DoWhileLoopTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.util.TreeScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.DoWhileLoopTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.util.TreeScanner; +import standalone.com.sun.source.util.Trees; /** * See {@link ForeachLoopElement}. @@ -64,19 +64,19 @@ public boolean hasControlFlowStatement() { boolean[] hasControlFlowStatement = { false }; new TreeScanner() { @Override - public Void visitBreak(com.sun.source.tree.BreakTree node, Trees p) { + public Void visitBreak(standalone.com.sun.source.tree.BreakTree node, Trees p) { hasControlFlowStatement[0] = true; return null; } @Override - public Void visitContinue(com.sun.source.tree.ContinueTree node, Trees p) { + public Void visitContinue(standalone.com.sun.source.tree.ContinueTree node, Trees p) { hasControlFlowStatement[0] = true; return null; } @Override - public Void visitReturn(com.sun.source.tree.ReturnTree node, Trees p) { + public Void visitReturn(standalone.com.sun.source.tree.ReturnTree node, Trees p) { hasControlFlowStatement[0] = true; return null; } @@ -94,13 +94,13 @@ public Void visitDoWhileLoop(DoWhileLoopTree node, Trees p) { } @Override - public Void visitWhileLoop(com.sun.source.tree.WhileLoopTree node, Trees p) { + public Void visitWhileLoop(standalone.com.sun.source.tree.WhileLoopTree node, Trees p) { // do not scan inner loops return null; } @Override - public Void visitForLoop(com.sun.source.tree.ForLoopTree node, Trees p) {// do not scan inner loops + public Void visitForLoop(standalone.com.sun.source.tree.ForLoopTree node, Trees p) {// do not scan inner loops return null; } diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/IdentifierElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/IdentifierElementSupport.java index a780b05da..ad02dbb25 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/IdentifierElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/IdentifierElementSupport.java @@ -23,7 +23,7 @@ import org.jsweet.transpiler.model.IdentifierElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.IdentifierTree; /** * See {@link IdentifierElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ImportElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ImportElementSupport.java index 149d2269c..829791d83 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/ImportElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/ImportElementSupport.java @@ -24,8 +24,8 @@ import org.jsweet.transpiler.model.ImportElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.Tree; /** * See {@link ImportElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/LiteralElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/LiteralElementSupport.java index 5e89c1045..917f514df 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/LiteralElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/LiteralElementSupport.java @@ -20,7 +20,7 @@ import org.jsweet.transpiler.model.LiteralElement; -import com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.LiteralTree; /** * See {@link LiteralElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/MethodInvocationElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/MethodInvocationElementSupport.java index d5c99f01a..dceac109d 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/MethodInvocationElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/MethodInvocationElementSupport.java @@ -28,10 +28,10 @@ import org.jsweet.transpiler.model.MethodInvocationElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.Tree; /** * See {@link MethodInvocationElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewArrayElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewArrayElementSupport.java index 49155c110..5017becb5 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewArrayElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewArrayElementSupport.java @@ -24,7 +24,7 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.NewArrayElement; -import com.sun.source.tree.NewArrayTree; +import standalone.com.sun.source.tree.NewArrayTree; /** * See {@link NewArrayElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewClassElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewClassElementSupport.java index f02bb41fe..9dbad0d64 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewClassElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/NewClassElementSupport.java @@ -27,7 +27,7 @@ import org.jsweet.transpiler.model.NewClassElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.NewClassTree; /** * See {@link NewClassElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeCastElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeCastElementSupport.java index 352a06ed6..c70373ecf 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeCastElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeCastElementSupport.java @@ -21,7 +21,7 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.TypeCastElement; -import com.sun.source.tree.TypeCastTree; +import standalone.com.sun.source.tree.TypeCastTree; /** * See {@link TypeCastElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeElementSupport.java index 3dee7a083..53733e107 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/TypeElementSupport.java @@ -17,7 +17,7 @@ import org.jsweet.transpiler.model.TypeElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree; public class TypeElementSupport extends ExtendedElementSupport implements TypeElement { diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/UnaryOperatorElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/UnaryOperatorElementSupport.java index 7797f1793..7777bd531 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/UnaryOperatorElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/UnaryOperatorElementSupport.java @@ -22,7 +22,7 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.UnaryOperatorElement; -import com.sun.source.tree.UnaryTree; +import standalone.com.sun.source.tree.UnaryTree; /** * See {@link UnaryOperatorElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableAccessElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableAccessElementSupport.java index dff80da58..cacdc3d48 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableAccessElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableAccessElementSupport.java @@ -25,8 +25,8 @@ import org.jsweet.transpiler.model.VariableAccessElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.Tree; /** * See {@link VariableAccessElement}. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableElementSupport.java b/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableElementSupport.java index c6d90642b..113afc1bf 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableElementSupport.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/model/support/VariableElementSupport.java @@ -17,7 +17,7 @@ import org.jsweet.transpiler.model.VariableElement; import org.jsweet.transpiler.util.Util; -import com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.VariableTree; public class VariableElementSupport extends ExtendedElementSupport implements VariableElement { diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreePrinter.java b/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreePrinter.java index 9bb0966eb..6f0c336fa 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreePrinter.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreePrinter.java @@ -34,15 +34,15 @@ import org.jsweet.transpiler.TypeChecker; import org.jsweet.transpiler.extension.PrinterAdapter; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.StatementTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.StatementTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; /** * A tree printer is a kind of tree scanner specialized in pretty printing the diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreeScanner.java b/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreeScanner.java index 184893247..21d8d9c6a 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreeScanner.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/AbstractTreeScanner.java @@ -47,14 +47,14 @@ import org.jsweet.transpiler.model.support.CompilationUnitElementSupport; import org.jsweet.transpiler.model.support.ExtendedElementSupport; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.Tree; -import com.sun.source.util.SourcePositions; -import com.sun.source.util.TreePath; -import com.sun.source.util.TreePathScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.util.SourcePositions; +import standalone.com.sun.source.util.TreePath; +import standalone.com.sun.source.util.TreePathScanner; +import standalone.com.sun.source.util.Trees; /** * A Java AST scanner for JSweet. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/JSDoc.java b/transpiler/src/main/java/org/jsweet/transpiler/util/JSDoc.java index eab61f572..096dfd2bc 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/JSDoc.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/JSDoc.java @@ -42,13 +42,13 @@ import org.jsweet.transpiler.model.ExtendedElement; import org.jsweet.transpiler.model.ExtendedElementFactory; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.ParameterizedTypeTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; -import com.sun.source.util.TreePath; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.ParameterizedTypeTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.util.TreePath; /** * A utility class to print JSDoc comments from regular Java comments. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/MainMethodFinder.java b/transpiler/src/main/java/org/jsweet/transpiler/util/MainMethodFinder.java index 016e57f5c..2a12e0d85 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/MainMethodFinder.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/MainMethodFinder.java @@ -3,9 +3,9 @@ import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.Modifier; -import com.sun.source.tree.MethodTree; -import com.sun.source.util.TreePathScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.util.TreePathScanner; +import standalone.com.sun.source.util.Trees; /** * Finds the first main method in a tree. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/ReferenceGrabber.java b/transpiler/src/main/java/org/jsweet/transpiler/util/ReferenceGrabber.java index 49a4b9a6d..4a39e5c96 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/ReferenceGrabber.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/ReferenceGrabber.java @@ -26,11 +26,11 @@ import org.jsweet.transpiler.JSweetContext; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.util.TreeScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.util.TreeScanner; +import standalone.com.sun.source.util.Trees; /** * A utility scanner that grabs all references to types used within a code tree. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/RollbackException.java b/transpiler/src/main/java/org/jsweet/transpiler/util/RollbackException.java index a1a6d0563..cc0dc30c6 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/RollbackException.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/RollbackException.java @@ -20,7 +20,7 @@ import java.util.function.Consumer; -import com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree; /** * This exception can be thrown to rollback the scanning of an AST. diff --git a/transpiler/src/main/java/org/jsweet/transpiler/util/Util.java b/transpiler/src/main/java/org/jsweet/transpiler/util/Util.java index 75bc19cb3..24f948ee6 100644 --- a/transpiler/src/main/java/org/jsweet/transpiler/util/Util.java +++ b/transpiler/src/main/java/org/jsweet/transpiler/util/Util.java @@ -71,47 +71,47 @@ import org.jsweet.transpiler.JSweetContext.DefaultMethodEntry; import org.jsweet.transpiler.SourcePosition; -import com.sun.source.tree.AnnotationTree; -import com.sun.source.tree.BinaryTree; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.BreakTree; -import com.sun.source.tree.CaseTree; -import com.sun.source.tree.CatchTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.CompoundAssignmentTree; -import com.sun.source.tree.DoWhileLoopTree; -import com.sun.source.tree.EnhancedForLoopTree; -import com.sun.source.tree.ExpressionTree; -import com.sun.source.tree.ForLoopTree; -import com.sun.source.tree.IdentifierTree; -import com.sun.source.tree.IfTree; -import com.sun.source.tree.ImportTree; -import com.sun.source.tree.LabeledStatementTree; -import com.sun.source.tree.LambdaExpressionTree; -import com.sun.source.tree.LineMap; -import com.sun.source.tree.LiteralTree; -import com.sun.source.tree.MemberSelectTree; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.ModifiersTree; -import com.sun.source.tree.NewClassTree; -import com.sun.source.tree.PackageTree; -import com.sun.source.tree.ReturnTree; -import com.sun.source.tree.StatementTree; -import com.sun.source.tree.SwitchTree; -import com.sun.source.tree.SynchronizedTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.Tree.Kind; -import com.sun.source.tree.TryTree; -import com.sun.source.tree.UnaryTree; -import com.sun.source.tree.VariableTree; -import com.sun.source.tree.WhileLoopTree; -import com.sun.source.util.SourcePositions; -import com.sun.source.util.TreePath; -import com.sun.source.util.TreePathScanner; -import com.sun.source.util.TreeScanner; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.AnnotationTree; +import standalone.com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.BreakTree; +import standalone.com.sun.source.tree.CaseTree; +import standalone.com.sun.source.tree.CatchTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.DoWhileLoopTree; +import standalone.com.sun.source.tree.EnhancedForLoopTree; +import standalone.com.sun.source.tree.ExpressionTree; +import standalone.com.sun.source.tree.ForLoopTree; +import standalone.com.sun.source.tree.IdentifierTree; +import standalone.com.sun.source.tree.IfTree; +import standalone.com.sun.source.tree.ImportTree; +import standalone.com.sun.source.tree.LabeledStatementTree; +import standalone.com.sun.source.tree.LambdaExpressionTree; +import standalone.com.sun.source.tree.LineMap; +import standalone.com.sun.source.tree.LiteralTree; +import standalone.com.sun.source.tree.MemberSelectTree; +import standalone.com.sun.source.tree.MethodInvocationTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.ModifiersTree; +import standalone.com.sun.source.tree.NewClassTree; +import standalone.com.sun.source.tree.PackageTree; +import standalone.com.sun.source.tree.ReturnTree; +import standalone.com.sun.source.tree.StatementTree; +import standalone.com.sun.source.tree.SwitchTree; +import standalone.com.sun.source.tree.SynchronizedTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.Tree.Kind; +import standalone.com.sun.source.tree.TryTree; +import standalone.com.sun.source.tree.UnaryTree; +import standalone.com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.WhileLoopTree; +import standalone.com.sun.source.util.SourcePositions; +import standalone.com.sun.source.util.TreePath; +import standalone.com.sun.source.util.TreePathScanner; +import standalone.com.sun.source.util.TreeScanner; +import standalone.com.sun.source.util.Trees; /** * Various utilities. @@ -359,9 +359,9 @@ public boolean isSourceElement(Element element) { // hack to know if it is a source file or a class file JavaFileObject sourceFile = javacInternals().getSourceFileObjectFromElement(clazz); if (sourceFile != null - && (sourceFile.getClass().getName().equals("com.sun.tools.javac.file.RegularFileObject") + && (sourceFile.getClass().getName().equals("standalone.com.sun.tools.javac.file.RegularFileObject") || sourceFile.getClass().getName() - .equals("com.sun.tools.javac.file.PathFileObject$SimpleFileObject"))) { + .equals("standalone.com.sun.tools.javac.file.PathFileObject$SimpleFileObject"))) { return true; } } @@ -2236,7 +2236,7 @@ public T getElementTypeForTreePath(TreePath treePath) { /** * Returns type associated with given tree * - * @see Trees#getTypeMirror(com.sun.source.util.TreePath) + * @see Trees#getTypeMirror(standalone.com.sun.source.util.TreePath) */ @SuppressWarnings("unchecked") public T getTypeForTreePath(TreePath treePath) { @@ -2452,11 +2452,11 @@ private static class JavacInternals { private JavacInternals(Types types) { try { - typesClass = this.getClass().getClassLoader().loadClass("com.sun.tools.javac.code.Types"); - typeClass = this.getClass().getClassLoader().loadClass("com.sun.tools.javac.code.Type"); + typesClass = this.getClass().getClassLoader().loadClass("standalone.com.sun.tools.javac.code.Types"); + typeClass = this.getClass().getClassLoader().loadClass("standalone.com.sun.tools.javac.code.Type"); typesErasureRecursiveMethod = typesClass.getMethod("erasureRecursive", typeClass); - Class JCTreeClass = this.getClass().getClassLoader().loadClass("com.sun.tools.javac.tree.JCTree"); + Class JCTreeClass = this.getClass().getClassLoader().loadClass("standalone.com.sun.tools.javac.tree.JCTree"); binaryTreeOperatorField = Stream.of(JCTreeClass.getDeclaredClasses()) .filter(innerClass -> innerClass.getSimpleName().equals("JCBinary")) // @@ -2480,7 +2480,7 @@ private JavacInternals(Types types) { .findFirst().get(); modifiersAnnotationsField = JCModifiersClass.getDeclaredField("annotations"); - Class listClass = this.getClass().getClassLoader().loadClass("com.sun.tools.javac.util.List"); + Class listClass = this.getClass().getClassLoader().loadClass("standalone.com.sun.tools.javac.util.List"); listAppendMethod = listClass.getMethod("append", Object.class); } catch (Exception e) { @@ -2518,9 +2518,9 @@ JavaFileObject getSourceFileObjectFromElement(TypeElement element) { static { try { var classLoader = JavacInternals.class.getClassLoader(); - typeField = classLoader.loadClass("com.sun.tools.javac.tree.JCTree").getDeclaredField("type"); + typeField = classLoader.loadClass("standalone.com.sun.tools.javac.tree.JCTree").getDeclaredField("type"); typeField.setAccessible(true); - tsymField = classLoader.loadClass("com.sun.tools.javac.code.Type").getDeclaredField("tsym"); + tsymField = classLoader.loadClass("standalone.com.sun.tools.javac.code.Type").getDeclaredField("tsym"); tsymField.setAccessible(true); } catch (Exception e) { throw new RuntimeException("Fatal error - cannot access legacy Javac API", e); diff --git a/transpiler/src/test/java/org/jsweet/test/transpiler/AbstractTest.java b/transpiler/src/test/java/org/jsweet/test/transpiler/AbstractTest.java index f2661e4d2..ffa4f08cc 100644 --- a/transpiler/src/test/java/org/jsweet/test/transpiler/AbstractTest.java +++ b/transpiler/src/test/java/org/jsweet/test/transpiler/AbstractTest.java @@ -51,9 +51,9 @@ import org.junit.rules.TestWatcher; import org.junit.runner.Description; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.util.Trees; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.util.Trees; import ts.nodejs.NodejsProcess; diff --git a/transpiler/src/test/java/org/jsweet/test/transpiler/util/ExecutionPathTest.java b/transpiler/src/test/java/org/jsweet/test/transpiler/util/ExecutionPathTest.java index 49ef03053..88f22b0f0 100644 --- a/transpiler/src/test/java/org/jsweet/test/transpiler/util/ExecutionPathTest.java +++ b/transpiler/src/test/java/org/jsweet/test/transpiler/util/ExecutionPathTest.java @@ -18,19 +18,19 @@ import org.junit.Before; import org.junit.Test; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.BreakTree; -import com.sun.source.tree.CaseTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.ExpressionStatementTree; -import com.sun.source.tree.ForLoopTree; -import com.sun.source.tree.IfTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.ReturnTree; -import com.sun.source.tree.SwitchTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.TryTree; +import standalone.com.sun.source.tree.BlockTree; +import standalone.com.sun.source.tree.BreakTree; +import standalone.com.sun.source.tree.CaseTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.ExpressionStatementTree; +import standalone.com.sun.source.tree.ForLoopTree; +import standalone.com.sun.source.tree.IfTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.ReturnTree; +import standalone.com.sun.source.tree.SwitchTree; +import standalone.com.sun.source.tree.Tree; +import standalone.com.sun.source.tree.TryTree; import source.syntax.ExecutionPaths; diff --git a/transpiler/src/test/java/org/jsweet/test/transpiler/util/UtilTest.java b/transpiler/src/test/java/org/jsweet/test/transpiler/util/UtilTest.java index b40d11aef..8bee0d307 100644 --- a/transpiler/src/test/java/org/jsweet/test/transpiler/util/UtilTest.java +++ b/transpiler/src/test/java/org/jsweet/test/transpiler/util/UtilTest.java @@ -28,13 +28,13 @@ import org.junit.Before; import org.junit.Test; -import com.sun.source.tree.BinaryTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.CompoundAssignmentTree; -import com.sun.source.tree.ExpressionStatementTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.VariableTree; +import standalone.com.sun.source.tree.BinaryTree; +import standalone.com.sun.source.tree.ClassTree; +import standalone.com.sun.source.tree.CompilationUnitTree; +import standalone.com.sun.source.tree.CompoundAssignmentTree; +import standalone.com.sun.source.tree.ExpressionStatementTree; +import standalone.com.sun.source.tree.MethodTree; +import standalone.com.sun.source.tree.VariableTree; import source.structural.ExtendsClassInSameFile; From f6d5238810b57912a9307e4488edb6b6a9efc6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 9 Oct 2023 16:20:26 +0200 Subject: [PATCH 2/3] Revert "test: Fix tests that spawn new processes" This reverts commit 6dca4706c271dd03a64151b62895a08dab5a8bab. --- .../test/transpiler/TranspilerTests.java | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/transpiler/src/test/java/org/jsweet/test/transpiler/TranspilerTests.java b/transpiler/src/test/java/org/jsweet/test/transpiler/TranspilerTests.java index 388b946e2..6f446f5ad 100644 --- a/transpiler/src/test/java/org/jsweet/test/transpiler/TranspilerTests.java +++ b/transpiler/src/test/java/org/jsweet/test/transpiler/TranspilerTests.java @@ -93,10 +93,6 @@ public void testCommandLine() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--targetVersion", "ES6", // @@ -122,10 +118,6 @@ public void testCommandLine() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // @@ -151,10 +143,6 @@ public void testCommandLine() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // @@ -173,10 +161,6 @@ public void testCommandLine() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // @@ -194,10 +178,6 @@ public void testCommandLine() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // @@ -224,10 +204,6 @@ public void testCommandLineSuccess() { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // @@ -252,10 +228,6 @@ public void testErroneousCommandLineArgument() throws Throwable { process = ProcessUtil.runCommand("java", line -> { System.out.println(line); }, null, "-cp", TranspilerTestRunner.getTestClassPath(), // - "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", JSweetCommandLineLauncher.class.getName(), // "--tsout", outDir.getPath(), // "--jsout", outDir.getPath(), // From ad3ff462a7523e889dd6fff23c956fa06d246ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 10 Oct 2023 15:19:57 +0200 Subject: [PATCH 3/3] transpiler: Use standalone-jdk11 1.0.0 --- transpiler/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transpiler/pom.xml b/transpiler/pom.xml index d9f1c3cff..fef2577ee 100644 --- a/transpiler/pom.xml +++ b/transpiler/pom.xml @@ -195,11 +195,11 @@ - - com.kohlschutter.jdk.compiler - standalone-jdk11 - 1.0.0-SNAPSHOT - + + com.kohlschutter.jdk.compiler + standalone-jdk11 + 1.0.0 + org.apache.commons commons-lang3