diff --git a/build.sbt b/build.sbt index 01d1d44dfd21..98dc0921ce6f 100644 --- a/build.sbt +++ b/build.sbt @@ -293,6 +293,7 @@ lazy val enso = (project in file(".")) .settings(version := "0.1") .aggregate( `akka-native`, + `akka-wrapper`, `benchmark-java-helpers`, `benchmarks-common`, `bench-processor`, @@ -301,6 +302,7 @@ lazy val enso = (project in file(".")) `connected-lock-manager`, `connected-lock-manager-server`, `desktop-environment`, + `directory-watcher-wrapper`, `distribution-manager`, downloader, editions, @@ -311,13 +313,16 @@ lazy val enso = (project in file(".")) `engine-runner`, `enso-test-java-helpers`, `exploratory-benchmark-java-helpers`, + `fansi-wrapper`, filewatcher, `http-test-helper`, `interpreter-dsl`, `interpreter-dsl-test`, + `jna-wrapper`, `json-rpc-server-test`, `json-rpc-server`, `language-server`, + `language-server-deps-wrapper`, launcher, `library-manager`, `library-manager-test`, @@ -338,6 +343,7 @@ lazy val enso = (project in file(".")) `project-manager`, `refactoring-utils`, runtime, + `runtime-and-langs`, `runtime-benchmarks`, `runtime-compiler`, `runtime-integration-tests`, @@ -348,14 +354,19 @@ lazy val enso = (project in file(".")) `runtime-instrument-id-execution`, `runtime-instrument-repl-debugger`, `runtime-instrument-runtime-server`, + `runtime-integration-tests`, + `runtime-parser`, `runtime-suggestions`, `runtime-version-manager`, `runtime-version-manager-test`, + `runtime-test-instruments`, + `scala-libs-wrapper`, `scala-yaml`, searcher, semver, `std-aws`, `std-base`, + `std-benchmarks`, `std-database`, `std-google-api`, `std-image`, @@ -369,7 +380,8 @@ lazy val enso = (project in file(".")) `test-utils`, `text-buffer`, `version-output`, - `ydoc-server` + `ydoc-server`, + `zio-wrapper` ) .settings(Global / concurrentRestrictions += Tags.exclusive(Exclusive)) .settings( diff --git a/engine/runtime-test-instruments/src/main/java/module-info.java b/engine/runtime-test-instruments/src/main/java/module-info.java index 6e816f6ba86f..2932902671a4 100644 --- a/engine/runtime-test-instruments/src/main/java/module-info.java +++ b/engine/runtime-test-instruments/src/main/java/module-info.java @@ -9,7 +9,6 @@ provides org.graalvm.polyglot.tck.LanguageProvider with org.enso.interpreter.test.instruments.tck.EnsoTckLanguageProvider; - provides com.oracle.truffle.api.instrumentation.provider.TruffleInstrumentProvider with org.enso.interpreter.test.instruments.CodeIdsTestInstrumentProvider, org.enso.interpreter.test.instruments.CodeLocationsTestInstrumentProvider, diff --git a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/CodeIdsTestInstrument.java b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/CodeIdsTestInstrument.java index 68b145492a3b..95b90c007fcf 100644 --- a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/CodeIdsTestInstrument.java +++ b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/CodeIdsTestInstrument.java @@ -5,7 +5,6 @@ import com.oracle.truffle.api.nodes.Node; import java.util.LinkedHashMap; import java.util.Map; - import java.util.UUID; import org.enso.interpreter.test.instruments.service.RuntimeTestService; import org.openide.util.Lookup; diff --git a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/NodeCountingTestInstrument.java b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/NodeCountingTestInstrument.java index 5382cabc71a0..01da09ff21ca 100644 --- a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/NodeCountingTestInstrument.java +++ b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/NodeCountingTestInstrument.java @@ -8,7 +8,6 @@ import com.oracle.truffle.api.instrumentation.TruffleInstrument; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.source.SourceSection; - import java.util.List; import java.util.Map; import java.util.UUID; @@ -77,10 +76,12 @@ public Map> assertNewNodes(String msg, int min, int max) { }; if (value < min) { - throw new AssertionError(dump.apply(msg + ". Minimal size should be " + min + ", but was: " + value + " in")); + throw new AssertionError( + dump.apply(msg + ". Minimal size should be " + min + ", but was: " + value + " in")); } if (value > max) { - throw new AssertionError(dump.apply(msg + ". Maximal size should be " + max + ", but was: " + value + " in")); + throw new AssertionError( + dump.apply(msg + ". Maximal size should be " + max + ", but was: " + value + " in")); } counter = new ConcurrentHashMap<>(); return prev; @@ -131,7 +132,6 @@ public void onReturnValue(VirtualFrame frame, Object result) { calls.put(nodeId, funcCallInfo); } } - } } } diff --git a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/FunctionCallInfo.java b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/FunctionCallInfo.java index d859d59a1e74..8ed2407a8ce3 100644 --- a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/FunctionCallInfo.java +++ b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/FunctionCallInfo.java @@ -1,10 +1,6 @@ package org.enso.interpreter.test.instruments.service; -public record FunctionCallInfo( - String moduleName, - String typeName, - String functionName -) { +public record FunctionCallInfo(String moduleName, String typeName, String functionName) { @Override public String toString() { diff --git a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/RuntimeTestService.java b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/RuntimeTestService.java index 8672fc95cb46..591925265d7d 100644 --- a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/RuntimeTestService.java +++ b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/service/RuntimeTestService.java @@ -1,9 +1,7 @@ package org.enso.interpreter.test.instruments.service; import com.oracle.truffle.api.nodes.Node; -import com.oracle.truffle.api.nodes.RootNode; import java.util.UUID; -import org.enso.interpreter.test.instruments.service.FunctionCallInfo; /** * A service that provides information from the `runtime` project to the instruments in this project @@ -12,9 +10,14 @@ */ public interface RuntimeTestService { UUID getNodeID(Node node); + boolean isExpressionNode(Object node); + boolean isTailCallException(Object obj); + boolean isFunctionCallInstrumentationNode(Object node); + boolean isFunctionCall(Object obj); + FunctionCallInfo extractFunctionCallInfo(Object functionCall); } diff --git a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/tck/EnsoTckLanguageProvider.java b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/tck/EnsoTckLanguageProvider.java index 30c5958a10d6..3c7a9bd26403 100644 --- a/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/tck/EnsoTckLanguageProvider.java +++ b/engine/runtime-test-instruments/src/main/java/org/enso/interpreter/test/instruments/tck/EnsoTckLanguageProvider.java @@ -2,7 +2,6 @@ import java.util.Collection; import java.util.List; - import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Source; import org.graalvm.polyglot.Value; @@ -11,8 +10,7 @@ import org.graalvm.polyglot.tck.TypeDescriptor; public class EnsoTckLanguageProvider implements LanguageProvider { - public EnsoTckLanguageProvider() { - } + public EnsoTckLanguageProvider() {} @Override public String getId() { @@ -34,42 +32,52 @@ public Collection createValueConstructors(Context context) { @Override public Collection createExpressions(Context context) { - var plus = context.eval("enso", """ + var plus = + context + .eval("enso", """ plus a b = a + b - """).invokeMember("eval_expression", "plus"); + """) + .invokeMember("eval_expression", "plus"); return List.of( - /* disabled until + is defined on Numbers again - Snippet.newBuilder("plus:Number", plus, TypeDescriptor.NUMBER) - .parameterTypes(TypeDescriptor.NUMBER, TypeDescriptor.NUMBER) - .build(), - */ - Snippet.newBuilder("plus:Text", plus, TypeDescriptor.STRING) - .parameterTypes(TypeDescriptor.STRING, TypeDescriptor.STRING) - .build() - ); + /* disabled until + is defined on Numbers again + Snippet.newBuilder("plus:Number", plus, TypeDescriptor.NUMBER) + .parameterTypes(TypeDescriptor.NUMBER, TypeDescriptor.NUMBER) + .build(), + */ + Snippet.newBuilder("plus:Text", plus, TypeDescriptor.STRING) + .parameterTypes(TypeDescriptor.STRING, TypeDescriptor.STRING) + .build()); } @Override public Collection createStatements(Context context) { - var when = context.eval("enso", """ + var when = + context + .eval("enso", """ when c = if c then 1 else -1 - """).invokeMember("eval_expression", "when");; - var which = context.eval("enso", """ + """) + .invokeMember("eval_expression", "when"); + ; + var which = + context + .eval( + "enso", + """ which c = case c of 0 -> "zero" 1 -> "one" 2 -> "two" _ -> "a lot" - """).invokeMember("eval_expression", "which"); + """) + .invokeMember("eval_expression", "which"); return List.of( - Snippet.newBuilder("if", when, TypeDescriptor.NUMBER) - .parameterTypes(TypeDescriptor.BOOLEAN) - .build(), - Snippet.newBuilder("if", which, TypeDescriptor.STRING) - .parameterTypes(TypeDescriptor.NUMBER) - .build() - ); + Snippet.newBuilder("if", when, TypeDescriptor.NUMBER) + .parameterTypes(TypeDescriptor.BOOLEAN) + .build(), + Snippet.newBuilder("if", which, TypeDescriptor.STRING) + .parameterTypes(TypeDescriptor.NUMBER) + .build()); } @Override @@ -80,9 +88,9 @@ public Collection createScripts(Context context) { @Override public Collection createInvalidSyntaxScripts(Context context) { return List.of( - Source.newBuilder("enso", """ + Source.newBuilder("enso", """ main = x + 2 - """, "unknown_x.enso").buildLiteral() - ); + """, "unknown_x.enso") + .buildLiteral()); } } diff --git a/lib/java/directory-watcher-wrapper/src/main/java/module-info.java b/lib/java/directory-watcher-wrapper/src/main/java/module-info.java index 183f3b84d5a7..33b00ae18c16 100644 --- a/lib/java/directory-watcher-wrapper/src/main/java/module-info.java +++ b/lib/java/directory-watcher-wrapper/src/main/java/module-info.java @@ -6,5 +6,6 @@ exports io.methvin.watcher; exports io.methvin.watchservice; + opens io.methvin.watchservice.jna; } diff --git a/lib/java/scala-libs-wrapper/src/main/java/module-info.java b/lib/java/scala-libs-wrapper/src/main/java/module-info.java index 04d49c3c5f0a..8d56d1d2d699 100644 --- a/lib/java/scala-libs-wrapper/src/main/java/module-info.java +++ b/lib/java/scala-libs-wrapper/src/main/java/module-info.java @@ -43,10 +43,12 @@ exports cats.kernel.instances.string; exports cats.kernel.instances.sortedSet; - // "com.github.plokhotnyuk.jsoniter-scala" % ("jsoniter-scala-core_" + scalaVer) % jsoniterVersion, + // "com.github.plokhotnyuk.jsoniter-scala" % ("jsoniter-scala-core_" + scalaVer) % + // jsoniterVersion, exports com.github.plokhotnyuk.jsoniter_scala.core; - // "com.github.plokhotnyuk.jsoniter-scala" % ("jsoniter-scala-macros_" + scalaVer) % jsoniterVersion, + // "com.github.plokhotnyuk.jsoniter-scala" % ("jsoniter-scala-macros_" + scalaVer) % + // jsoniterVersion, exports com.github.plokhotnyuk.jsoniter_scala.macros; // "com.typesafe.scala-logging" % ("scala-logging_" + scalaVer) % scalaLoggingVersion, @@ -62,7 +64,6 @@ // "io.circe" % ("circe-parser_" + scalaVer) % circeVersion, exports io.circe.parser; - // "io.circe" % ("circe-generic_" + scalaVer) % circeVersion, exports io.circe.generic.decoding; exports io.circe.generic; diff --git a/lib/java/zio-wrapper/src/main/java/module-info.java b/lib/java/zio-wrapper/src/main/java/module-info.java index 4403767c9cdf..331aed641f8b 100644 --- a/lib/java/zio-wrapper/src/main/java/module-info.java +++ b/lib/java/zio-wrapper/src/main/java/module-info.java @@ -17,9 +17,9 @@ exports zio.stacktracer; // dev.zio:zio-interop-cats_2.13:23.0.0.6 - //exports zio.interop.console; - //exports zio.interop.stm; - //exports zio.stream.interop; + // exports zio.interop.console; + // exports zio.interop.stm; + // exports zio.stream.interop; // dev.zio:izumi-reflect_2.13:2.3.8 exports izumi.reflect; @@ -35,5 +35,4 @@ // dev.zio:izumi-reflect-thirdparty-boopickle-shaded_2.13:2.3.8 exports izumi.reflect.thirdparty.internal.boopickle; - }