mirror of
https://github.com/enso-org/enso.git
synced 2024-12-26 14:38:33 +03:00
Reduce set of JDK modules required by Enso (#9868)
This commit is contained in:
parent
15976a8505
commit
a69d89b274
@ -1791,7 +1791,7 @@ lazy val runtime = (project in file("engine/runtime"))
|
||||
)
|
||||
.dependsOn(`common-polyglot-core-utils`)
|
||||
.dependsOn(`edition-updater`)
|
||||
.dependsOn(`interpreter-dsl`)
|
||||
.dependsOn(`interpreter-dsl` % "provided")
|
||||
.dependsOn(`persistance-dsl` % "provided")
|
||||
.dependsOn(`library-manager`)
|
||||
.dependsOn(`logging-truffle-connector`)
|
||||
|
@ -1,8 +1,6 @@
|
||||
open module org.enso.runtime {
|
||||
requires java.base;
|
||||
requires java.compiler;
|
||||
requires java.desktop;
|
||||
requires java.se;
|
||||
requires java.net.http;
|
||||
// Because of akka.util.Unsafe
|
||||
requires jdk.unsupported;
|
||||
requires org.graalvm.polyglot;
|
||||
|
@ -4,7 +4,6 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.google.common.collect.Streams;
|
||||
import java.util.Arrays;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Stream;
|
||||
@ -46,7 +45,11 @@ public class BinaryOpFloatTest extends TestBase {
|
||||
var oneOps =
|
||||
Arrays.asList(OPERATIONS).stream().map((op) -> new Object[] {op, r.nextDouble(), 1.0});
|
||||
var extraOps = Stream.of(new Object[] {" %", 19.73, 12.10}, new Object[] {" ^", 10.12, 73.19});
|
||||
return Streams.concat(randomOps, zeroOps, oneOps, extraOps).toArray(Object[][]::new);
|
||||
|
||||
var s1 = Stream.concat(randomOps, zeroOps);
|
||||
var s2 = Stream.concat(s1, oneOps);
|
||||
var s3 = Stream.concat(s2, extraOps);
|
||||
return s3.toArray(Object[][]::new);
|
||||
}
|
||||
|
||||
private static Context ctx;
|
||||
|
@ -4,7 +4,6 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.google.common.collect.Streams;
|
||||
import java.util.Arrays;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Stream;
|
||||
@ -59,7 +58,11 @@ public class BinaryOpIntegerTest extends TestBase {
|
||||
Arrays.asList(OPERATIONS).stream().map((op) -> new Object[] {op, r.nextLong(), 0});
|
||||
var oneOps = Arrays.asList(OPERATIONS).stream().map((op) -> new Object[] {op, r.nextLong(), 1});
|
||||
var extraOps = Stream.of(new Object[] {" %", 19, 73}, new Object[] {".bit_shift", 12, 10});
|
||||
return Streams.concat(randomOps, zeroOps, oneOps, extraOps).toArray(Object[][]::new);
|
||||
|
||||
var s1 = Stream.concat(randomOps, zeroOps);
|
||||
var s2 = Stream.concat(s1, oneOps);
|
||||
var s3 = Stream.concat(s2, extraOps);
|
||||
return s3.toArray(Object[][]::new);
|
||||
}
|
||||
|
||||
private static Context ctx;
|
||||
|
@ -25,8 +25,6 @@ import org.enso.compiler.context.FreshNameSupply;
|
||||
import org.enso.compiler.core.CompilerError;
|
||||
import org.enso.compiler.phase.BuiltinsIrBuilder;
|
||||
import org.enso.interpreter.EnsoLanguage;
|
||||
import org.enso.interpreter.dsl.TypeProcessor;
|
||||
import org.enso.interpreter.dsl.model.MethodDefinition;
|
||||
import org.enso.interpreter.node.expression.builtin.Any;
|
||||
import org.enso.interpreter.node.expression.builtin.Boolean;
|
||||
import org.enso.interpreter.node.expression.builtin.Builtin;
|
||||
@ -337,7 +335,10 @@ public final class Builtins {
|
||||
private static List<Constructor<? extends Builtin>> readBuiltinTypes() {
|
||||
ClassLoader classLoader = Builtins.class.getClassLoader();
|
||||
List<String> lines;
|
||||
try (InputStream resource = classLoader.getResourceAsStream(TypeProcessor.META_PATH)) {
|
||||
final String NODE_PKG = "org.enso.interpreter.node.expression.builtin";
|
||||
final String META_PATH =
|
||||
"META-INF" + "/" + NODE_PKG.replace('.', '/') + "/BuiltinTypes.metadata";
|
||||
try (InputStream resource = classLoader.getResourceAsStream(META_PATH)) {
|
||||
lines =
|
||||
new BufferedReader(new InputStreamReader(resource, StandardCharsets.UTF_8))
|
||||
.lines()
|
||||
@ -438,7 +439,11 @@ public final class Builtins {
|
||||
private static Map<String, LoadedBuiltinMetaMethod> readBuiltinMethodsMeta() {
|
||||
ClassLoader classLoader = Builtins.class.getClassLoader();
|
||||
List<String> lines;
|
||||
try (InputStream resource = classLoader.getResourceAsStream(MethodDefinition.META_PATH)) {
|
||||
|
||||
final String NODE_PKG = "org.enso.interpreter.node.expression.builtin";
|
||||
final String META_PATH =
|
||||
"META-INF" + "/" + NODE_PKG.replace('.', '/') + "/BuiltinMethods.metadata";
|
||||
try (InputStream resource = classLoader.getResourceAsStream(META_PATH)) {
|
||||
lines =
|
||||
new BufferedReader(new InputStreamReader(resource, StandardCharsets.UTF_8))
|
||||
.lines()
|
||||
|
@ -1,3 +1,3 @@
|
||||
63FF6DEF4A66E3D50D1F62B2C012C0FAF9B8C980D09E4E0F5A3EA72886AB0223
|
||||
D0D1595E3558C5D3E4E1D040FFF078F2EE815059BA46F1BA0AF546A524303AC0
|
||||
3768984C1A9E71A22E77ED4EFEBA08B9A2BA4A8EB9220E5B206B67F9B58FDFDF
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user