Ensure wrapper projects are listed in aggregates (#11323)

* Ensure wrapper projects are listed in aggregates

Previously, doing clean to deal with weird modularization failures would
have no effect.

* And updated formatting

* More projects

As cherry-picked from https://github.com/enso-org/enso/pull/11321
This commit is contained in:
Hubert Plociniczak 2024-10-14 20:46:08 +02:00 committed by GitHub
parent d1ee7fadce
commit e1da31b2a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 67 additions and 49 deletions

View File

@ -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(

View File

@ -9,7 +9,6 @@ module org.enso.runtime.test {
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,

View File

@ -5,7 +5,6 @@ import com.oracle.truffle.api.instrumentation.*;
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;

View File

@ -8,7 +8,6 @@ import com.oracle.truffle.api.instrumentation.SourceSectionFilter;
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 class NodeCountingTestInstrument extends TruffleInstrument {
};
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 class NodeCountingTestInstrument extends TruffleInstrument {
calls.put(nodeId, funcCallInfo);
}
}
}
}
}

View File

@ -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() {

View File

@ -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 @@ import org.enso.interpreter.test.instruments.service.FunctionCallInfo;
*/
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);
}

View File

@ -2,7 +2,6 @@ package org.enso.interpreter.test.instruments.tck;
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.Snippet;
import org.graalvm.polyglot.tck.TypeDescriptor;
public class EnsoTckLanguageProvider implements LanguageProvider {
public EnsoTckLanguageProvider() {
}
public EnsoTckLanguageProvider() {}
@Override
public String getId() {
@ -34,42 +32,52 @@ public class EnsoTckLanguageProvider implements LanguageProvider {
@Override
public Collection<? extends Snippet> 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<? extends Snippet> 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 class EnsoTckLanguageProvider implements LanguageProvider {
@Override
public Collection<? extends Source> createInvalidSyntaxScripts(Context context) {
return List.of(
Source.newBuilder("enso", """
Source.newBuilder("enso", """
main = x + 2
""", "unknown_x.enso").buildLiteral()
);
""", "unknown_x.enso")
.buildLiteral());
}
}

View File

@ -6,5 +6,6 @@ module org.enso.directory.watcher.wrapper {
exports io.methvin.watcher;
exports io.methvin.watchservice;
opens io.methvin.watchservice.jna;
}

View File

@ -43,10 +43,12 @@ module org.enso.scala.wrapper {
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 @@ module org.enso.scala.wrapper {
// "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;

View File

@ -17,9 +17,9 @@ module org.enso.zio.wrapper {
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 @@ module org.enso.zio.wrapper {
// dev.zio:izumi-reflect-thirdparty-boopickle-shaded_2.13:2.3.8
exports izumi.reflect.thirdparty.internal.boopickle;
}