mirror of
https://github.com/enso-org/enso.git
synced 2024-12-22 21:01:37 +03:00
ContextFactory reused to initialize language-server context (#10670)
This commit is contained in:
parent
73cb5d1dd7
commit
cb72487cc9
@ -1446,6 +1446,12 @@ val testLogProviderOptions = Seq(
|
|||||||
"-Dconfig.resource=application-test.conf"
|
"-Dconfig.resource=application-test.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/** engine/common project contains classes that are necessary to configure
|
||||||
|
* GraalVM's polyglot context. Most specifically it contains `ContextFactory`.
|
||||||
|
* As such it needs to depend on `org.graalvm.polyglot` package. Otherwise
|
||||||
|
* its dependencies shall be limited - no JSON & co. please. For purposes
|
||||||
|
* of consistently setting up loaders, the module depends on `logging-utils`.
|
||||||
|
*/
|
||||||
lazy val `engine-common` = project
|
lazy val `engine-common` = project
|
||||||
.in(file("engine/common"))
|
.in(file("engine/common"))
|
||||||
.settings(
|
.settings(
|
||||||
@ -1457,6 +1463,8 @@ lazy val `engine-common` = project
|
|||||||
"org.graalvm.polyglot" % "polyglot" % graalMavenPackagesVersion % "provided"
|
"org.graalvm.polyglot" % "polyglot" % graalMavenPackagesVersion % "provided"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
.dependsOn(`logging-config`)
|
||||||
|
.dependsOn(`logging-utils`)
|
||||||
.dependsOn(testkit % Test)
|
.dependsOn(testkit % Test)
|
||||||
|
|
||||||
lazy val `polyglot-api` = project
|
lazy val `polyglot-api` = project
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
package org.enso.runner;
|
package org.enso.common;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.enso.common.HostAccessFactory;
|
|
||||||
import org.enso.common.LanguageInfo;
|
|
||||||
import org.enso.logger.Converter;
|
import org.enso.logger.Converter;
|
||||||
import org.enso.logger.JulHandler;
|
import org.enso.logger.JulHandler;
|
||||||
import org.enso.logger.LoggerSetup;
|
import org.enso.logger.LoggerSetup;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.polyglot.debugger.DebugServerInfo;
|
|
||||||
import org.enso.polyglot.debugger.DebuggerSessionManagerEndpoint;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
|
import org.graalvm.polyglot.HostAccess;
|
||||||
|
import org.graalvm.polyglot.io.MessageTransport;
|
||||||
import org.slf4j.event.Level;
|
import org.slf4j.event.Level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,7 +20,6 @@ import org.slf4j.event.Level;
|
|||||||
* of any projects)
|
* of any projects)
|
||||||
* @param in the input stream for standard in
|
* @param in the input stream for standard in
|
||||||
* @param out the output stream for standard out
|
* @param out the output stream for standard out
|
||||||
* @param repl the Repl manager to use for this context
|
|
||||||
* @param logLevel the log level for this context
|
* @param logLevel the log level for this context
|
||||||
* @param enableIrCaches whether or not IR caching should be enabled
|
* @param enableIrCaches whether or not IR caching should be enabled
|
||||||
* @param disablePrivateCheck If `private` keyword should be disabled.
|
* @param disablePrivateCheck If `private` keyword should be disabled.
|
||||||
@ -34,11 +30,12 @@ import org.slf4j.event.Level;
|
|||||||
* @param executionEnvironment optional name of the execution environment to use during execution
|
* @param executionEnvironment optional name of the execution environment to use during execution
|
||||||
* @param warningsLimit maximal number of warnings reported to the user
|
* @param warningsLimit maximal number of warnings reported to the user
|
||||||
*/
|
*/
|
||||||
final class ContextFactory {
|
public final class ContextFactory {
|
||||||
private String projectRoot;
|
private String projectRoot;
|
||||||
private InputStream in;
|
private InputStream in = System.in;
|
||||||
private OutputStream out;
|
private OutputStream out = System.out;
|
||||||
private Repl repl;
|
private OutputStream err = System.err;
|
||||||
|
private MessageTransport messageTransport;
|
||||||
private Level logLevel;
|
private Level logLevel;
|
||||||
private boolean logMasking;
|
private boolean logMasking;
|
||||||
private boolean enableIrCaches;
|
private boolean enableIrCaches;
|
||||||
@ -72,8 +69,13 @@ final class ContextFactory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContextFactory repl(Repl repl) {
|
public ContextFactory err(OutputStream err) {
|
||||||
this.repl = repl;
|
this.err = err;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContextFactory messageTransport(MessageTransport t) {
|
||||||
|
this.messageTransport = t;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +134,7 @@ final class ContextFactory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
PolyglotContext build() {
|
public Context build() {
|
||||||
if (executionEnvironment != null) {
|
if (executionEnvironment != null) {
|
||||||
options.put("enso.ExecutionEnvironment", executionEnvironment);
|
options.put("enso.ExecutionEnvironment", executionEnvironment);
|
||||||
}
|
}
|
||||||
@ -142,7 +144,7 @@ final class ContextFactory {
|
|||||||
Context.newBuilder()
|
Context.newBuilder()
|
||||||
.allowExperimentalOptions(true)
|
.allowExperimentalOptions(true)
|
||||||
.allowAllAccess(true)
|
.allowAllAccess(true)
|
||||||
.allowHostAccess(new HostAccessFactory().allWithTypeMapping())
|
.allowHostAccess(allWithTypeMapping())
|
||||||
.option(RuntimeOptions.PROJECT_ROOT, projectRoot)
|
.option(RuntimeOptions.PROJECT_ROOT, projectRoot)
|
||||||
.option(RuntimeOptions.STRICT_ERRORS, Boolean.toString(strictErrors))
|
.option(RuntimeOptions.STRICT_ERRORS, Boolean.toString(strictErrors))
|
||||||
.option(RuntimeOptions.WAIT_FOR_PENDING_SERIALIZATION_JOBS, "true")
|
.option(RuntimeOptions.WAIT_FOR_PENDING_SERIALIZATION_JOBS, "true")
|
||||||
@ -152,19 +154,16 @@ final class ContextFactory {
|
|||||||
.option(RuntimeOptions.DISABLE_IR_CACHES, Boolean.toString(!enableIrCaches))
|
.option(RuntimeOptions.DISABLE_IR_CACHES, Boolean.toString(!enableIrCaches))
|
||||||
.option(RuntimeOptions.DISABLE_PRIVATE_CHECK, Boolean.toString(disablePrivateCheck))
|
.option(RuntimeOptions.DISABLE_PRIVATE_CHECK, Boolean.toString(disablePrivateCheck))
|
||||||
.option(RuntimeOptions.ENABLE_STATIC_ANALYSIS, Boolean.toString(enableStaticAnalysis))
|
.option(RuntimeOptions.ENABLE_STATIC_ANALYSIS, Boolean.toString(enableStaticAnalysis))
|
||||||
.option(DebugServerInfo.ENABLE_OPTION, "true")
|
|
||||||
.option(RuntimeOptions.LOG_MASKING, Boolean.toString(logMasking))
|
.option(RuntimeOptions.LOG_MASKING, Boolean.toString(logMasking))
|
||||||
.options(options)
|
.options(options)
|
||||||
.option(RuntimeOptions.ENABLE_AUTO_PARALLELISM, Boolean.toString(enableAutoParallelism))
|
.option(RuntimeOptions.ENABLE_AUTO_PARALLELISM, Boolean.toString(enableAutoParallelism))
|
||||||
.option(RuntimeOptions.WARNINGS_LIMIT, Integer.toString(warningsLimit))
|
.option(RuntimeOptions.WARNINGS_LIMIT, Integer.toString(warningsLimit))
|
||||||
.out(out)
|
.out(out)
|
||||||
.in(in)
|
.err(err)
|
||||||
.serverTransport(
|
.in(in);
|
||||||
(uri, peer) ->
|
if (messageTransport != null) {
|
||||||
DebugServerInfo.URI.equals(uri.toString())
|
builder.serverTransport(messageTransport);
|
||||||
? new DebuggerSessionManagerEndpoint(repl, peer)
|
}
|
||||||
: null);
|
|
||||||
|
|
||||||
builder.option(RuntimeOptions.LOG_LEVEL, logLevelName);
|
builder.option(RuntimeOptions.LOG_LEVEL, logLevelName);
|
||||||
var logHandler = JulHandler.get();
|
var logHandler = JulHandler.get();
|
||||||
var logLevels = LoggerSetup.get().getConfig().getLoggers();
|
var logLevels = LoggerSetup.get().getConfig().getLoggers();
|
||||||
@ -197,7 +196,7 @@ final class ContextFactory {
|
|||||||
.option("java.UseBindingsLoader", "true")
|
.option("java.UseBindingsLoader", "true")
|
||||||
.allowCreateThread(true);
|
.allowCreateThread(true);
|
||||||
}
|
}
|
||||||
return new PolyglotContext(builder.build());
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -217,4 +216,20 @@ final class ContextFactory {
|
|||||||
}
|
}
|
||||||
ENGINE_HAS_JAVA = found;
|
ENGINE_HAS_JAVA = found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static HostAccess allWithTypeMapping() {
|
||||||
|
return HostAccess.newBuilder()
|
||||||
|
.allowPublicAccess(true)
|
||||||
|
.allowAllImplementations(true)
|
||||||
|
.allowAllClassImplementations(true)
|
||||||
|
.allowArrayAccess(true)
|
||||||
|
.allowListAccess(true)
|
||||||
|
.allowBufferAccess(true)
|
||||||
|
.allowIterableAccess(true)
|
||||||
|
.allowIteratorAccess(true)
|
||||||
|
.allowMapAccess(true)
|
||||||
|
.allowAccessInheritance(true)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,21 +0,0 @@
|
|||||||
package org.enso.common;
|
|
||||||
|
|
||||||
import org.graalvm.polyglot.HostAccess;
|
|
||||||
|
|
||||||
/** Utility class for creating HostAccess object. */
|
|
||||||
public class HostAccessFactory {
|
|
||||||
public HostAccess allWithTypeMapping() {
|
|
||||||
return HostAccess.newBuilder()
|
|
||||||
.allowPublicAccess(true)
|
|
||||||
.allowAllImplementations(true)
|
|
||||||
.allowAllClassImplementations(true)
|
|
||||||
.allowArrayAccess(true)
|
|
||||||
.allowListAccess(true)
|
|
||||||
.allowBufferAccess(true)
|
|
||||||
.allowIterableAccess(true)
|
|
||||||
.allowIteratorAccess(true)
|
|
||||||
.allowMapAccess(true)
|
|
||||||
.allowAccessInheritance(true)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +1,14 @@
|
|||||||
package org.enso.polyglot;
|
package org.enso.common;
|
||||||
|
|
||||||
import com.oracle.truffle.api.Option;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import org.enso.common.LanguageInfo;
|
|
||||||
import org.graalvm.options.OptionCategory;
|
|
||||||
import org.graalvm.options.OptionDescriptor;
|
import org.graalvm.options.OptionDescriptor;
|
||||||
import org.graalvm.options.OptionDescriptors;
|
import org.graalvm.options.OptionDescriptors;
|
||||||
import org.graalvm.options.OptionKey;
|
import org.graalvm.options.OptionKey;
|
||||||
|
|
||||||
/** Class representing runtime options supported by the Enso engine. */
|
/** Class representing runtime options supported by the Enso engine. */
|
||||||
public class RuntimeOptions {
|
public final class RuntimeOptions {
|
||||||
|
private RuntimeOptions() {}
|
||||||
public static final String PROJECT_ROOT = optionName("projectRoot");
|
public static final String PROJECT_ROOT = optionName("projectRoot");
|
||||||
public static final OptionKey<String> PROJECT_ROOT_KEY = new OptionKey<>("");
|
public static final OptionKey<String> PROJECT_ROOT_KEY = new OptionKey<>("");
|
||||||
private static final OptionDescriptor PROJECT_ROOT_DESCRIPTOR =
|
private static final OptionDescriptor PROJECT_ROOT_DESCRIPTOR =
|
||||||
@ -124,9 +123,7 @@ public class RuntimeOptions {
|
|||||||
|
|
||||||
public static final String ENABLE_EXECUTION_TIMER = optionName("enableExecutionTimer");
|
public static final String ENABLE_EXECUTION_TIMER = optionName("enableExecutionTimer");
|
||||||
|
|
||||||
@Option(
|
/* Enables timer that counts down the execution time of expressions. */
|
||||||
help = "Enables timer that counts down the execution time of expressions.",
|
|
||||||
category = OptionCategory.INTERNAL)
|
|
||||||
public static final OptionKey<Boolean> ENABLE_EXECUTION_TIMER_KEY = new OptionKey<>(true);
|
public static final OptionKey<Boolean> ENABLE_EXECUTION_TIMER_KEY = new OptionKey<>(true);
|
||||||
|
|
||||||
private static final OptionDescriptor ENABLE_EXECUTION_TIMER_DESCRIPTOR =
|
private static final OptionDescriptor ENABLE_EXECUTION_TIMER_DESCRIPTOR =
|
||||||
@ -134,9 +131,7 @@ public class RuntimeOptions {
|
|||||||
|
|
||||||
public static final String WARNINGS_LIMIT = optionName("warningsLimit");
|
public static final String WARNINGS_LIMIT = optionName("warningsLimit");
|
||||||
|
|
||||||
@Option(
|
/* Maximal number of warnings that can be attached to a value. */
|
||||||
help = "Maximal number of warnings that can be attached to a value.",
|
|
||||||
category = OptionCategory.INTERNAL)
|
|
||||||
public static final OptionKey<Integer> WARNINGS_LIMIT_KEY = new OptionKey<>(100);
|
public static final OptionKey<Integer> WARNINGS_LIMIT_KEY = new OptionKey<>(100);
|
||||||
|
|
||||||
private static final OptionDescriptor WARNINGS_LIMIT_DESCRIPTOR =
|
private static final OptionDescriptor WARNINGS_LIMIT_DESCRIPTOR =
|
@ -10,13 +10,13 @@ import java.util.function.Supplier;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames.TopScope;
|
import org.enso.common.MethodNames.TopScope;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.EnsoLanguage;
|
import org.enso.interpreter.EnsoLanguage;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.interpreter.runtime.callable.function.Function;
|
import org.enso.interpreter.runtime.callable.function.Function;
|
||||||
import org.enso.interpreter.runtime.data.text.Text;
|
import org.enso.interpreter.runtime.data.text.Text;
|
||||||
import org.enso.interpreter.runtime.error.DataflowError;
|
import org.enso.interpreter.runtime.error.DataflowError;
|
||||||
import org.enso.interpreter.runtime.error.PanicException;
|
import org.enso.interpreter.runtime.error.PanicException;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
@ -2,18 +2,17 @@ package org.enso.languageserver.boot.resource;
|
|||||||
|
|
||||||
import akka.event.EventStream;
|
import akka.event.EventStream;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
import org.enso.common.ContextFactory;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.languageserver.boot.ComponentSupervisor;
|
import org.enso.languageserver.boot.ComponentSupervisor;
|
||||||
import org.enso.languageserver.event.InitializedEvent;
|
import org.enso.languageserver.event.InitializedEvent;
|
||||||
import org.graalvm.polyglot.Context;
|
|
||||||
import org.graalvm.polyglot.Engine;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/** Initialize the Truffle context. */
|
/** Initialize the Truffle context. */
|
||||||
public class TruffleContextInitialization extends LockedInitialization {
|
public class TruffleContextInitialization extends LockedInitialization {
|
||||||
|
|
||||||
private final Context.Builder truffleContextBuilder;
|
private final ContextFactory contextFactory;
|
||||||
private final ComponentSupervisor supervisor;
|
private final ComponentSupervisor supervisor;
|
||||||
private final EventStream eventStream;
|
private final EventStream eventStream;
|
||||||
|
|
||||||
@ -24,15 +23,16 @@ public class TruffleContextInitialization extends LockedInitialization {
|
|||||||
*
|
*
|
||||||
* @param executor the executor that runs the initialization
|
* @param executor the executor that runs the initialization
|
||||||
* @param eventStream the events stream
|
* @param eventStream the events stream
|
||||||
* @param truffleContextBuilder the Truffle context builder
|
* @param supervisor supervisor
|
||||||
|
* @param factory the Truffle context builder
|
||||||
*/
|
*/
|
||||||
public TruffleContextInitialization(
|
public TruffleContextInitialization(
|
||||||
Executor executor,
|
Executor executor,
|
||||||
Context.Builder truffleContextBuilder,
|
ContextFactory factory,
|
||||||
ComponentSupervisor supervisor,
|
ComponentSupervisor supervisor,
|
||||||
EventStream eventStream) {
|
EventStream eventStream) {
|
||||||
super(executor);
|
super(executor);
|
||||||
this.truffleContextBuilder = truffleContextBuilder;
|
this.contextFactory = factory;
|
||||||
this.supervisor = supervisor;
|
this.supervisor = supervisor;
|
||||||
this.eventStream = eventStream;
|
this.eventStream = eventStream;
|
||||||
}
|
}
|
||||||
@ -40,18 +40,7 @@ public class TruffleContextInitialization extends LockedInitialization {
|
|||||||
@Override
|
@Override
|
||||||
public void initComponent() {
|
public void initComponent() {
|
||||||
logger.trace("Creating Runtime context");
|
logger.trace("Creating Runtime context");
|
||||||
if (Engine.newBuilder()
|
var truffleContext = contextFactory.build();
|
||||||
.allowExperimentalOptions(true)
|
|
||||||
.build()
|
|
||||||
.getLanguages()
|
|
||||||
.containsKey("java")) {
|
|
||||||
truffleContextBuilder
|
|
||||||
.option("java.ExposeNativeJavaVM", "true")
|
|
||||||
.option("java.Polyglot", "true")
|
|
||||||
.option("java.UseBindingsLoader", "true")
|
|
||||||
.allowCreateThread(true);
|
|
||||||
}
|
|
||||||
var truffleContext = truffleContextBuilder.build();
|
|
||||||
supervisor.registerService(truffleContext);
|
supervisor.registerService(truffleContext);
|
||||||
logger.trace("Created Runtime context [{}]", truffleContext);
|
logger.trace("Created Runtime context [{}]", truffleContext);
|
||||||
logger.debug("Initializing Runtime context [{}]", truffleContext);
|
logger.debug("Initializing Runtime context [{}]", truffleContext);
|
||||||
|
@ -46,16 +46,14 @@ import org.enso.librarymanager.LibraryLocations
|
|||||||
import org.enso.librarymanager.local.DefaultLocalLibraryProvider
|
import org.enso.librarymanager.local.DefaultLocalLibraryProvider
|
||||||
import org.enso.librarymanager.published.PublishedLibraryCache
|
import org.enso.librarymanager.published.PublishedLibraryCache
|
||||||
import org.enso.lockmanager.server.LockManagerService
|
import org.enso.lockmanager.server.LockManagerService
|
||||||
import org.enso.logger.Converter
|
|
||||||
import org.enso.logger.masking.Masking
|
import org.enso.logger.masking.Masking
|
||||||
import org.enso.logger.JulHandler
|
|
||||||
import org.enso.logger.akka.AkkaConverter
|
import org.enso.logger.akka.AkkaConverter
|
||||||
import org.enso.common.HostAccessFactory
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.{RuntimeOptions, RuntimeServerInfo}
|
import org.enso.common.ContextFactory
|
||||||
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.profiling.events.NoopEventsMonitor
|
import org.enso.profiling.events.NoopEventsMonitor
|
||||||
import org.enso.searcher.memory.InMemorySuggestionsRepo
|
import org.enso.searcher.memory.InMemorySuggestionsRepo
|
||||||
import org.enso.text.{ContentBasedVersioning, Sha3_224VersionCalculator}
|
import org.enso.text.{ContentBasedVersioning, Sha3_224VersionCalculator}
|
||||||
import org.graalvm.polyglot.Context
|
|
||||||
import org.graalvm.polyglot.io.MessageEndpoint
|
import org.graalvm.polyglot.io.MessageEndpoint
|
||||||
import org.slf4j.event.Level
|
import org.slf4j.event.Level
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
@ -307,31 +305,29 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: Level) {
|
|||||||
val stdInSink = new ObservableOutputStream
|
val stdInSink = new ObservableOutputStream
|
||||||
val stdIn = new ObservablePipedInputStream(stdInSink)
|
val stdIn = new ObservablePipedInputStream(stdInSink)
|
||||||
|
|
||||||
val builder = Context
|
val extraOptions = new java.util.HashMap[String, String]()
|
||||||
.newBuilder()
|
extraOptions.put(RuntimeServerInfo.ENABLE_OPTION, "true")
|
||||||
.allowAllAccess(true)
|
extraOptions.put(RuntimeOptions.INTERACTIVE_MODE, "true")
|
||||||
.allowHostAccess(new HostAccessFactory().allWithTypeMapping())
|
extraOptions.put(
|
||||||
.allowExperimentalOptions(true)
|
RuntimeOptions.LOG_MASKING,
|
||||||
.option(RuntimeServerInfo.ENABLE_OPTION, "true")
|
Masking.isMaskingEnabled.toString
|
||||||
.option(RuntimeOptions.INTERACTIVE_MODE, "true")
|
)
|
||||||
.option(RuntimeOptions.PROJECT_ROOT, serverConfig.contentRootPath)
|
extraOptions.put(RuntimeOptions.EDITION_OVERRIDE, Info.currentEdition)
|
||||||
.option(
|
extraOptions.put(
|
||||||
RuntimeOptions.LOG_LEVEL,
|
RuntimeOptions.JOB_PARALLELISM,
|
||||||
Converter.toJavaLevel(logLevel).getName
|
Runtime.getRuntime.availableProcessors().toString
|
||||||
)
|
)
|
||||||
.option(RuntimeOptions.STRICT_ERRORS, "false")
|
|
||||||
.option(RuntimeOptions.LOG_MASKING, Masking.isMaskingEnabled.toString)
|
val builder = ContextFactory
|
||||||
.option(RuntimeOptions.EDITION_OVERRIDE, Info.currentEdition)
|
.create()
|
||||||
.option(
|
.projectRoot(serverConfig.contentRootPath)
|
||||||
RuntimeOptions.JOB_PARALLELISM,
|
.logLevel(logLevel)
|
||||||
Runtime.getRuntime.availableProcessors().toString
|
.strictErrors(false)
|
||||||
)
|
|
||||||
.option(RuntimeOptions.PREINITIALIZE, "js")
|
|
||||||
.out(stdOut)
|
.out(stdOut)
|
||||||
.err(stdErr)
|
.err(stdErr)
|
||||||
.in(stdIn)
|
.in(stdIn)
|
||||||
.logHandler(JulHandler.get())
|
.options(extraOptions)
|
||||||
.serverTransport((uri: URI, peerEndpoint: MessageEndpoint) => {
|
.messageTransport((uri: URI, peerEndpoint: MessageEndpoint) => {
|
||||||
if (uri.toString == RuntimeServerInfo.URI) {
|
if (uri.toString == RuntimeServerInfo.URI) {
|
||||||
val connection = new RuntimeConnector.Endpoint(
|
val connection = new RuntimeConnector.Endpoint(
|
||||||
runtimeConnector,
|
runtimeConnector,
|
||||||
|
@ -16,7 +16,7 @@ import org.enso.languageserver.boot.resource.{
|
|||||||
import org.enso.languageserver.data.ProjectDirectoriesConfig
|
import org.enso.languageserver.data.ProjectDirectoriesConfig
|
||||||
import org.enso.languageserver.effect
|
import org.enso.languageserver.effect
|
||||||
import org.enso.searcher.memory.InMemorySuggestionsRepo
|
import org.enso.searcher.memory.InMemorySuggestionsRepo
|
||||||
import org.graalvm.polyglot.Context
|
import org.enso.common.ContextFactory
|
||||||
|
|
||||||
import scala.concurrent.ExecutionContextExecutor
|
import scala.concurrent.ExecutionContextExecutor
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ object ResourcesInitialization {
|
|||||||
directoriesConfig: ProjectDirectoriesConfig,
|
directoriesConfig: ProjectDirectoriesConfig,
|
||||||
protocolFactory: ProtocolFactory,
|
protocolFactory: ProtocolFactory,
|
||||||
suggestionsRepo: InMemorySuggestionsRepo,
|
suggestionsRepo: InMemorySuggestionsRepo,
|
||||||
truffleContextBuilder: Context#Builder,
|
truffleContextBuilder: ContextFactory,
|
||||||
truffleContextSupervisor: ComponentSupervisor,
|
truffleContextSupervisor: ComponentSupervisor,
|
||||||
runtime: effect.Runtime,
|
runtime: effect.Runtime,
|
||||||
ydocSupervisor: ComponentSupervisor
|
ydocSupervisor: ComponentSupervisor
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.enso.polyglot
|
package org.enso.polyglot
|
||||||
|
|
||||||
|
import org.enso.common.RuntimeOptions
|
||||||
import org.graalvm.polyglot.Context
|
import org.graalvm.polyglot.Context
|
||||||
import org.scalatest.flatspec.AnyFlatSpec
|
import org.scalatest.flatspec.AnyFlatSpec
|
||||||
import org.scalatest.matchers.should.Matchers
|
import org.scalatest.matchers.should.Matchers
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.enso.polyglot
|
package org.enso.polyglot
|
||||||
|
|
||||||
|
import org.enso.common.RuntimeOptions
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.{Files, Paths}
|
import java.nio.file.{Files, Paths}
|
||||||
import org.enso.pkg.{Package, PackageManager}
|
import org.enso.pkg.{Package, PackageManager}
|
||||||
|
@ -2,14 +2,11 @@ package org.enso.runner.common
|
|||||||
|
|
||||||
import org.enso.editions.LibraryName
|
import org.enso.editions.LibraryName
|
||||||
import org.enso.libraryupload.DependencyExtractor
|
import org.enso.libraryupload.DependencyExtractor
|
||||||
import org.enso.logger.Converter
|
|
||||||
|
|
||||||
import org.enso.logger.JulHandler
|
|
||||||
import org.enso.pkg.Package
|
import org.enso.pkg.Package
|
||||||
import org.enso.pkg.SourceFile
|
import org.enso.pkg.SourceFile
|
||||||
import org.enso.common.HostAccessFactory
|
import org.enso.polyglot.PolyglotContext
|
||||||
import org.enso.polyglot.{PolyglotContext, RuntimeOptions}
|
import org.enso.common.ContextFactory
|
||||||
import org.graalvm.polyglot.Context
|
|
||||||
import org.slf4j.event.Level
|
import org.slf4j.event.Level
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@ -55,18 +52,10 @@ class CompilerBasedDependencyExtractor(logLevel: Level)
|
|||||||
* project root.
|
* project root.
|
||||||
*/
|
*/
|
||||||
private def createContextWithProject(pkg: Package[File]): PolyglotContext = {
|
private def createContextWithProject(pkg: Package[File]): PolyglotContext = {
|
||||||
val context = Context
|
val context = ContextFactory
|
||||||
.newBuilder()
|
.create()
|
||||||
.allowExperimentalOptions(true)
|
.projectRoot(pkg.root.getCanonicalPath)
|
||||||
.allowAllAccess(true)
|
.logLevel(logLevel)
|
||||||
.allowHostAccess(new HostAccessFactory().allWithTypeMapping())
|
|
||||||
.option(RuntimeOptions.PROJECT_ROOT, pkg.root.getCanonicalPath)
|
|
||||||
.option("js.foreign-object-prototype", "true")
|
|
||||||
.option(
|
|
||||||
RuntimeOptions.LOG_LEVEL,
|
|
||||||
Converter.toJavaLevel(logLevel).getName
|
|
||||||
)
|
|
||||||
.logHandler(JulHandler.get())
|
|
||||||
.build
|
.build
|
||||||
new PolyglotContext(context)
|
new PolyglotContext(context)
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import org.apache.commons.cli.HelpFormatter;
|
|||||||
import org.apache.commons.cli.Option;
|
import org.apache.commons.cli.Option;
|
||||||
import org.apache.commons.cli.OptionGroup;
|
import org.apache.commons.cli.OptionGroup;
|
||||||
import org.apache.commons.cli.Options;
|
import org.apache.commons.cli.Options;
|
||||||
|
import org.enso.common.ContextFactory;
|
||||||
import org.enso.common.HostEnsoUtils;
|
import org.enso.common.HostEnsoUtils;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.distribution.DistributionManager;
|
import org.enso.distribution.DistributionManager;
|
||||||
@ -34,6 +35,8 @@ import org.enso.pkg.PackageManager$;
|
|||||||
import org.enso.pkg.Template;
|
import org.enso.pkg.Template;
|
||||||
import org.enso.polyglot.Module;
|
import org.enso.polyglot.Module;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
|
import org.enso.polyglot.debugger.DebugServerInfo;
|
||||||
|
import org.enso.polyglot.debugger.DebuggerSessionManagerEndpoint;
|
||||||
import org.enso.profiling.sampler.NoopSampler;
|
import org.enso.profiling.sampler.NoopSampler;
|
||||||
import org.enso.profiling.sampler.OutputStreamSampler;
|
import org.enso.profiling.sampler.OutputStreamSampler;
|
||||||
import org.enso.runner.common.LanguageServerApi;
|
import org.enso.runner.common.LanguageServerApi;
|
||||||
@ -43,6 +46,7 @@ import org.enso.version.VersionDescription;
|
|||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
import org.graalvm.polyglot.PolyglotException.StackFrame;
|
import org.graalvm.polyglot.PolyglotException.StackFrame;
|
||||||
import org.graalvm.polyglot.SourceSection;
|
import org.graalvm.polyglot.SourceSection;
|
||||||
|
import org.graalvm.polyglot.io.MessageTransport;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.slf4j.event.Level;
|
import org.slf4j.event.Level;
|
||||||
import scala.Option$;
|
import scala.Option$;
|
||||||
@ -617,18 +621,18 @@ public final class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var context =
|
var context =
|
||||||
ContextFactory.create()
|
new PolyglotContext(
|
||||||
.projectRoot(packagePath)
|
ContextFactory.create()
|
||||||
.in(System.in)
|
.projectRoot(packagePath)
|
||||||
.out(System.out)
|
.in(System.in)
|
||||||
.repl(new Repl(makeTerminalForRepl()))
|
.out(System.out)
|
||||||
.logLevel(logLevel)
|
.logLevel(logLevel)
|
||||||
.logMasking(logMasking)
|
.logMasking(logMasking)
|
||||||
.enableIrCaches(true)
|
.enableIrCaches(true)
|
||||||
.enableStaticAnalysis(enableStaticAnalysis)
|
.enableStaticAnalysis(enableStaticAnalysis)
|
||||||
.strictErrors(true)
|
.strictErrors(true)
|
||||||
.useGlobalIrCacheLocation(shouldUseGlobalCache)
|
.useGlobalIrCacheLocation(shouldUseGlobalCache)
|
||||||
.build();
|
.build());
|
||||||
|
|
||||||
var topScope = context.getTopScope();
|
var topScope = context.getTopScope();
|
||||||
try {
|
try {
|
||||||
@ -688,15 +692,10 @@ public final class Main {
|
|||||||
options.put("engine.TraceCompilation", "true");
|
options.put("engine.TraceCompilation", "true");
|
||||||
options.put("engine.MultiTier", "false");
|
options.put("engine.MultiTier", "false");
|
||||||
}
|
}
|
||||||
if (inspect) {
|
|
||||||
options.put("inspect", "");
|
var factory =
|
||||||
}
|
|
||||||
var context =
|
|
||||||
ContextFactory.create()
|
ContextFactory.create()
|
||||||
.projectRoot(projectRoot)
|
.projectRoot(projectRoot)
|
||||||
.in(System.in)
|
|
||||||
.out(System.out)
|
|
||||||
.repl(new Repl(makeTerminalForRepl()))
|
|
||||||
.logLevel(logLevel)
|
.logLevel(logLevel)
|
||||||
.logMasking(logMasking)
|
.logMasking(logMasking)
|
||||||
.enableIrCaches(enableIrCaches)
|
.enableIrCaches(enableIrCaches)
|
||||||
@ -706,8 +705,16 @@ public final class Main {
|
|||||||
.enableStaticAnalysis(enableStaticAnalysis)
|
.enableStaticAnalysis(enableStaticAnalysis)
|
||||||
.executionEnvironment(executionEnvironment != null ? executionEnvironment : "live")
|
.executionEnvironment(executionEnvironment != null ? executionEnvironment : "live")
|
||||||
.warningsLimit(warningsLimit)
|
.warningsLimit(warningsLimit)
|
||||||
.options(options)
|
.options(options);
|
||||||
.build();
|
|
||||||
|
if (inspect) {
|
||||||
|
options.put("inspect", "");
|
||||||
|
} else {
|
||||||
|
// by default running with debug server enabled
|
||||||
|
factory.messageTransport(replTransport());
|
||||||
|
options.put(DebugServerInfo.ENABLE_OPTION, "true");
|
||||||
|
}
|
||||||
|
var context = new PolyglotContext(factory.build());
|
||||||
|
|
||||||
if (projectMode) {
|
if (projectMode) {
|
||||||
var result = PackageManager$.MODULE$.Default().loadPackage(file);
|
var result = PackageManager$.MODULE$.Default().loadPackage(file);
|
||||||
@ -761,15 +768,15 @@ public final class Main {
|
|||||||
private void generateDocsFrom(
|
private void generateDocsFrom(
|
||||||
String path, Level logLevel, boolean logMasking, boolean enableIrCaches) {
|
String path, Level logLevel, boolean logMasking, boolean enableIrCaches) {
|
||||||
var executionContext =
|
var executionContext =
|
||||||
ContextFactory.create()
|
new PolyglotContext(
|
||||||
.projectRoot(path)
|
ContextFactory.create()
|
||||||
.in(System.in)
|
.projectRoot(path)
|
||||||
.out(System.out)
|
.in(System.in)
|
||||||
.repl(new Repl(makeTerminalForRepl()))
|
.out(System.out)
|
||||||
.logLevel(logLevel)
|
.logLevel(logLevel)
|
||||||
.logMasking(logMasking)
|
.logMasking(logMasking)
|
||||||
.enableIrCaches(enableIrCaches)
|
.enableIrCaches(enableIrCaches)
|
||||||
.build();
|
.build());
|
||||||
|
|
||||||
var file = new File(path);
|
var file = new File(path);
|
||||||
var pkg = PackageManager.Default().fromDirectory(file);
|
var pkg = PackageManager.Default().fromDirectory(file);
|
||||||
@ -908,22 +915,34 @@ public final class Main {
|
|||||||
.replace("$mainMethodName", mainMethodName);
|
.replace("$mainMethodName", mainMethodName);
|
||||||
var replModuleName = "Internal_Repl_Module___";
|
var replModuleName = "Internal_Repl_Module___";
|
||||||
var projectRoot = projectPath != null ? projectPath : "";
|
var projectRoot = projectPath != null ? projectPath : "";
|
||||||
|
var options = Collections.singletonMap(DebugServerInfo.ENABLE_OPTION, "true");
|
||||||
|
|
||||||
var context =
|
var context =
|
||||||
ContextFactory.create()
|
new PolyglotContext(
|
||||||
.projectRoot(projectRoot)
|
ContextFactory.create()
|
||||||
.in(System.in)
|
.projectRoot(projectRoot)
|
||||||
.out(System.out)
|
.messageTransport(replTransport())
|
||||||
.repl(new Repl(makeTerminalForRepl()))
|
.options(options)
|
||||||
.logLevel(logLevel)
|
.logLevel(logLevel)
|
||||||
.logMasking(logMasking)
|
.logMasking(logMasking)
|
||||||
.enableIrCaches(enableIrCaches)
|
.enableIrCaches(enableIrCaches)
|
||||||
.enableStaticAnalysis(enableStaticAnalysis)
|
.enableStaticAnalysis(enableStaticAnalysis)
|
||||||
.build();
|
.build());
|
||||||
var mainModule = context.evalModule(dummySourceToTriggerRepl, replModuleName);
|
var mainModule = context.evalModule(dummySourceToTriggerRepl, replModuleName);
|
||||||
runMain(mainModule, null, Collections.emptyList(), mainMethodName);
|
runMain(mainModule, null, Collections.emptyList(), mainMethodName);
|
||||||
throw exitSuccess();
|
throw exitSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static MessageTransport replTransport() {
|
||||||
|
var repl = new Repl(makeTerminalForRepl());
|
||||||
|
MessageTransport transport =
|
||||||
|
(uri, peer) ->
|
||||||
|
DebugServerInfo.URI.equals(uri.toString())
|
||||||
|
? new DebuggerSessionManagerEndpoint(repl, peer)
|
||||||
|
: null;
|
||||||
|
return transport;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints the version of the Enso executable.
|
* Prints the version of the Enso executable.
|
||||||
*
|
*
|
||||||
@ -1365,7 +1384,7 @@ public final class Main {
|
|||||||
});
|
});
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
System.err.println(ex.getMessage());
|
System.err.println(ex.getMessage());
|
||||||
exitFail();
|
throw exitFail();
|
||||||
}
|
}
|
||||||
} catch (WrongOption e) {
|
} catch (WrongOption e) {
|
||||||
System.err.println(e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
|
@ -12,8 +12,8 @@ import java.nio.file.Paths;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Value;
|
import org.graalvm.polyglot.Value;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
|
@ -8,6 +8,7 @@ import java.nio.file.Path;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.enso.common.CompilationStage;
|
import org.enso.common.CompilationStage;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.benchmarks.Utils;
|
import org.enso.compiler.benchmarks.Utils;
|
||||||
import org.enso.compiler.context.CompilerContext;
|
import org.enso.compiler.context.CompilerContext;
|
||||||
import org.enso.compiler.phase.ImportResolver;
|
import org.enso.compiler.phase.ImportResolver;
|
||||||
@ -15,7 +16,6 @@ import org.enso.compiler.phase.exports.ExportCycleException;
|
|||||||
import org.enso.compiler.phase.exports.ExportsResolution;
|
import org.enso.compiler.phase.exports.ExportsResolution;
|
||||||
import org.enso.interpreter.runtime.Module;
|
import org.enso.interpreter.runtime.Module;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.enso.test.utils.SourceModule;
|
import org.enso.test.utils.SourceModule;
|
||||||
|
@ -4,9 +4,9 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.Compiler;
|
import org.enso.compiler.Compiler;
|
||||||
import org.enso.compiler.benchmarks.Utils;
|
import org.enso.compiler.benchmarks.Utils;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
|
@ -9,11 +9,11 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.Compiler;
|
import org.enso.compiler.Compiler;
|
||||||
import org.enso.compiler.benchmarks.Utils;
|
import org.enso.compiler.benchmarks.Utils;
|
||||||
import org.enso.interpreter.runtime.Module;
|
import org.enso.interpreter.runtime.Module;
|
||||||
import org.enso.interpreter.runtime.data.Type;
|
import org.enso.interpreter.runtime.data.Type;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
|
@ -8,12 +8,12 @@ import java.util.Random;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.Compiler;
|
import org.enso.compiler.Compiler;
|
||||||
import org.enso.compiler.benchmarks.CodeGenerator;
|
import org.enso.compiler.benchmarks.CodeGenerator;
|
||||||
import org.enso.compiler.benchmarks.Utils;
|
import org.enso.compiler.benchmarks.Utils;
|
||||||
import org.enso.interpreter.runtime.Module;
|
import org.enso.interpreter.runtime.Module;
|
||||||
import org.enso.interpreter.runtime.data.Type;
|
import org.enso.interpreter.runtime.data.Type;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
|
@ -15,8 +15,8 @@ import java.util.logging.Level;
|
|||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
import org.enso.common.MethodNames.Module;
|
import org.enso.common.MethodNames.Module;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.core.ir.expression.errors.Conversion.DeclaredAsPrivate$;
|
import org.enso.compiler.core.ir.expression.errors.Conversion.DeclaredAsPrivate$;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -12,7 +12,7 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -11,9 +11,9 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -13,11 +13,11 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.context.CompilerContext.Module;
|
import org.enso.compiler.context.CompilerContext.Module;
|
||||||
import org.enso.compiler.data.BindingsMap;
|
import org.enso.compiler.data.BindingsMap;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.enso.test.utils.SourceModule;
|
import org.enso.test.utils.SourceModule;
|
||||||
|
@ -10,13 +10,13 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.core.ir.module.scope.Definition;
|
import org.enso.compiler.core.ir.module.scope.Definition;
|
||||||
import org.enso.compiler.core.ir.module.scope.definition.Method;
|
import org.enso.compiler.core.ir.module.scope.definition.Method;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedConstructor;
|
import org.enso.compiler.data.BindingsMap.ResolvedConstructor;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedModule;
|
import org.enso.compiler.data.BindingsMap.ResolvedModule;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedType;
|
import org.enso.compiler.data.BindingsMap.ResolvedType;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
|
@ -19,10 +19,10 @@ import java.util.logging.LogRecord;
|
|||||||
import java.util.logging.SimpleFormatter;
|
import java.util.logging.SimpleFormatter;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.core.ir.Module;
|
import org.enso.compiler.core.ir.Module;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.pkg.PackageManager;
|
import org.enso.pkg.PackageManager;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -11,9 +11,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.pkg.PackageManager;
|
import org.enso.pkg.PackageManager;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -8,9 +8,9 @@ import java.nio.ByteBuffer;
|
|||||||
import org.enso.common.CompilationStage;
|
import org.enso.common.CompilationStage;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.CompilerTest;
|
import org.enso.compiler.CompilerTest;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -8,7 +8,7 @@ import java.nio.file.Paths;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.text.buffer.Rope$;
|
import org.enso.text.buffer.Rope$;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Engine;
|
import org.graalvm.polyglot.Engine;
|
||||||
|
@ -11,10 +11,10 @@ import java.nio.file.Paths;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.data.BindingsMap;
|
import org.enso.compiler.data.BindingsMap;
|
||||||
import org.enso.compiler.data.BindingsMap$ModuleReference$Concrete;
|
import org.enso.compiler.data.BindingsMap$ModuleReference$Concrete;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Engine;
|
import org.graalvm.polyglot.Engine;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -32,7 +32,7 @@ import java.util.TreeSet;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import org.enso.common.MethodNames.Module;
|
import org.enso.common.MethodNames.Module;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Engine;
|
import org.graalvm.polyglot.Engine;
|
||||||
import org.graalvm.polyglot.Language;
|
import org.graalvm.polyglot.Language;
|
||||||
|
@ -15,10 +15,10 @@ import java.util.logging.Level;
|
|||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames.Module;
|
import org.enso.common.MethodNames.Module;
|
||||||
import org.enso.common.MethodNames.TopScope;
|
import org.enso.common.MethodNames.TopScope;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.core.ir.Diagnostic;
|
import org.enso.compiler.core.ir.Diagnostic;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.interpreter.runtime.util.DiagnosticFormatter;
|
import org.enso.interpreter.runtime.util.DiagnosticFormatter;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
|
@ -10,9 +10,9 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.polyglot.TopScope;
|
import org.enso.polyglot.TopScope;
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -4,7 +4,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Language;
|
import org.graalvm.polyglot.Language;
|
||||||
|
@ -4,7 +4,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
|
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Engine;
|
import org.graalvm.polyglot.Engine;
|
||||||
|
@ -5,7 +5,7 @@ import static org.junit.Assert.*;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import org.enso.common.MethodNames;
|
import org.enso.common.MethodNames;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
|
@ -8,9 +8,9 @@ import static org.hamcrest.Matchers.is;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -8,10 +8,10 @@ import static org.hamcrest.Matchers.is;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedConversionMethod;
|
import org.enso.compiler.data.BindingsMap.ResolvedConversionMethod;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -7,10 +7,10 @@ import static org.hamcrest.Matchers.is;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.data.BindingsMap.DefinedEntity;
|
import org.enso.compiler.data.BindingsMap.DefinedEntity;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -7,10 +7,10 @@ import static org.hamcrest.Matchers.is;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedModule;
|
import org.enso.compiler.data.BindingsMap.ResolvedModule;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -8,11 +8,11 @@ import java.io.IOException;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.phase.exports.ExportsResolution;
|
import org.enso.compiler.phase.exports.ExportsResolution;
|
||||||
import org.enso.interpreter.runtime.Module;
|
import org.enso.interpreter.runtime.Module;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -7,9 +7,9 @@ import static org.hamcrest.Matchers.is;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -9,10 +9,10 @@ import static org.junit.Assert.fail;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.data.BindingsMap.ResolvedType;
|
import org.enso.compiler.data.BindingsMap.ResolvedType;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ModuleUtils;
|
import org.enso.test.utils.ModuleUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
|
@ -7,10 +7,10 @@ import static org.junit.Assert.assertTrue;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.callable.function.Function;
|
import org.enso.interpreter.runtime.callable.function.Function;
|
||||||
import org.enso.interpreter.runtime.data.atom.AtomConstructor;
|
import org.enso.interpreter.runtime.data.atom.AtomConstructor;
|
||||||
import org.enso.interpreter.service.ExecutionService.FunctionPointer;
|
import org.enso.interpreter.service.ExecutionService.FunctionPointer;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Language;
|
import org.graalvm.polyglot.Language;
|
||||||
|
@ -8,11 +8,11 @@ import com.oracle.truffle.api.instrumentation.StandardTags;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.tag.AvoidIdInstrumentationTag;
|
import org.enso.interpreter.runtime.tag.AvoidIdInstrumentationTag;
|
||||||
import org.enso.interpreter.runtime.tag.IdentifiedTag;
|
import org.enso.interpreter.runtime.tag.IdentifiedTag;
|
||||||
import org.enso.interpreter.test.Metadata;
|
import org.enso.interpreter.test.Metadata;
|
||||||
import org.enso.interpreter.test.instruments.NodeCountingTestInstrument;
|
import org.enso.interpreter.test.instruments.NodeCountingTestInstrument;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Language;
|
import org.graalvm.polyglot.Language;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -8,10 +8,10 @@ import java.io.IOException;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.util.ScalaConversions;
|
import org.enso.interpreter.util.ScalaConversions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.enso.test.utils.SourceModule;
|
import org.enso.test.utils.SourceModule;
|
||||||
|
@ -4,7 +4,7 @@ import static org.hamcrest.CoreMatchers.is;
|
|||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
|
@ -10,9 +10,9 @@ import static org.junit.Assert.fail;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.util.ScalaConversions;
|
import org.enso.interpreter.util.ScalaConversions;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
|
@ -7,10 +7,10 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.Module;
|
import org.enso.interpreter.runtime.Module;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.test.utils.ContextUtils;
|
import org.enso.test.utils.ContextUtils;
|
||||||
import org.enso.test.utils.ProjectUtils;
|
import org.enso.test.utils.ProjectUtils;
|
||||||
import org.enso.test.utils.SourceModule;
|
import org.enso.test.utils.SourceModule;
|
||||||
|
@ -5,7 +5,8 @@ import org.apache.commons.io.filefilter.{IOFileFilter, TrueFileFilter}
|
|||||||
import org.enso.interpreter.test.{InterpreterException, ValueEquality}
|
import org.enso.interpreter.test.{InterpreterException, ValueEquality}
|
||||||
import org.enso.pkg.PackageManager
|
import org.enso.pkg.PackageManager
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.{PolyglotContext, RuntimeOptions}
|
import org.enso.common.RuntimeOptions
|
||||||
|
import org.enso.polyglot.PolyglotContext
|
||||||
import org.graalvm.polyglot.{Context, Value}
|
import org.graalvm.polyglot.{Context, Value}
|
||||||
import org.scalatest.BeforeAndAfterAll
|
import org.scalatest.BeforeAndAfterAll
|
||||||
import org.scalatest.flatspec.AnyFlatSpec
|
import org.scalatest.flatspec.AnyFlatSpec
|
||||||
|
@ -14,7 +14,7 @@ import org.enso.pkg.QualifiedName
|
|||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.common.MethodNames
|
import org.enso.common.MethodNames
|
||||||
import org.enso.compiler.phase.exports.Node
|
import org.enso.compiler.phase.exports.Node
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.graalvm.polyglot.{Context, Engine}
|
import org.graalvm.polyglot.{Context, Engine}
|
||||||
import org.scalatest.BeforeAndAfter
|
import org.scalatest.BeforeAndAfter
|
||||||
import org.scalatest.matchers.should.Matchers
|
import org.scalatest.matchers.should.Matchers
|
||||||
|
@ -14,7 +14,9 @@ import org.enso.polyglot.debugger.{
|
|||||||
SessionManager
|
SessionManager
|
||||||
}
|
}
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.{Function, PolyglotContext, RuntimeOptions}
|
import org.enso.common.RuntimeOptions
|
||||||
|
|
||||||
|
import org.enso.polyglot.{Function, PolyglotContext}
|
||||||
import org.graalvm.polyglot.{Context, Value}
|
import org.graalvm.polyglot.{Context, Value}
|
||||||
import org.scalatest.Assertions
|
import org.scalatest.Assertions
|
||||||
import org.scalatest.matchers.should.Matchers
|
import org.scalatest.matchers.should.Matchers
|
||||||
|
@ -2,7 +2,9 @@ package org.enso.interpreter.test
|
|||||||
|
|
||||||
import org.enso.pkg.PackageManager
|
import org.enso.pkg.PackageManager
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.{PolyglotContext, RuntimeOptions}
|
import org.enso.common.RuntimeOptions
|
||||||
|
|
||||||
|
import org.enso.polyglot.PolyglotContext
|
||||||
import org.graalvm.polyglot.{Context, Value}
|
import org.graalvm.polyglot.{Context, Value}
|
||||||
import org.scalatest.flatspec.AnyFlatSpec
|
import org.scalatest.flatspec.AnyFlatSpec
|
||||||
import org.scalatest.matchers.should.Matchers
|
import org.scalatest.matchers.should.Matchers
|
||||||
|
@ -3,7 +3,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.graalvm.polyglot.Context
|
import org.graalvm.polyglot.Context
|
||||||
|
@ -2,7 +2,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
|
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.{ContentVersion, Sha3_224VersionCalculator}
|
import org.enso.text.{ContentVersion, Sha3_224VersionCalculator}
|
||||||
|
@ -14,7 +14,7 @@ import org.enso.pkg.{
|
|||||||
}
|
}
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.common.MethodNames
|
import org.enso.common.MethodNames
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.testkit.OsSpec
|
import org.enso.testkit.OsSpec
|
||||||
|
@ -3,7 +3,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.editing.model
|
import org.enso.text.editing.model
|
||||||
|
@ -6,7 +6,7 @@ import org.enso.interpreter.test.Metadata
|
|||||||
import org.enso.pkg.{Package, PackageManager}
|
import org.enso.pkg.{Package, PackageManager}
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.common.MethodNames
|
import org.enso.common.MethodNames
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.testkit.OsSpec
|
import org.enso.testkit.OsSpec
|
||||||
|
@ -3,7 +3,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
import org.enso.interpreter.runtime.`type`.{Constants, ConstantsGen}
|
import org.enso.interpreter.runtime.`type`.{Constants, ConstantsGen}
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.{ContentVersion, Sha3_224VersionCalculator}
|
import org.enso.text.{ContentVersion, Sha3_224VersionCalculator}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.enso.interpreter.test.instrument
|
package org.enso.interpreter.test.instrument
|
||||||
|
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.graalvm.polyglot.{Context, PolyglotException}
|
import org.graalvm.polyglot.{Context, PolyglotException}
|
||||||
import org.scalatest.matchers.should.Matchers
|
import org.scalatest.matchers.should.Matchers
|
||||||
import org.scalatest.wordspec.AnyWordSpec
|
import org.scalatest.wordspec.AnyWordSpec
|
||||||
|
@ -4,7 +4,7 @@ import org.apache.commons.io.output.TeeOutputStream
|
|||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.editing.model
|
import org.enso.text.editing.model
|
||||||
|
@ -7,7 +7,7 @@ import org.enso.interpreter.test.Metadata
|
|||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.common.MethodNames
|
import org.enso.common.MethodNames
|
||||||
import org.enso.polyglot.data.TypeGraph
|
import org.enso.polyglot.data.TypeGraph
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.editing.model
|
import org.enso.text.editing.model
|
||||||
|
@ -3,7 +3,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.pkg.{Package, PackageManager, QualifiedName}
|
import org.enso.pkg.{Package, PackageManager, QualifiedName}
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.Suggestion
|
import org.enso.polyglot.Suggestion
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
|
@ -2,7 +2,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
|
|
||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.ExportedSymbol
|
import org.enso.polyglot.ExportedSymbol
|
||||||
import org.enso.polyglot.ModuleExports
|
import org.enso.polyglot.ModuleExports
|
||||||
|
@ -2,10 +2,10 @@ package org.enso.interpreter.test.instrument
|
|||||||
|
|
||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.{
|
import org.enso.polyglot.{
|
||||||
ExportedSymbol,
|
ExportedSymbol,
|
||||||
ModuleExports,
|
ModuleExports,
|
||||||
RuntimeOptions,
|
|
||||||
RuntimeServerInfo,
|
RuntimeServerInfo,
|
||||||
Suggestion
|
Suggestion
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import org.enso.interpreter.runtime.`type`.ConstantsGen
|
|||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.common.LanguageInfo
|
import org.enso.common.LanguageInfo
|
||||||
import org.enso.common.MethodNames
|
import org.enso.common.MethodNames
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot.RuntimeServerInfo
|
import org.enso.polyglot.RuntimeServerInfo
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.editing.model
|
import org.enso.text.editing.model
|
||||||
|
@ -3,6 +3,7 @@ package org.enso.interpreter.test.instrument
|
|||||||
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
import org.enso.interpreter.runtime.`type`.ConstantsGen
|
||||||
import org.enso.interpreter.test.Metadata
|
import org.enso.interpreter.test.Metadata
|
||||||
import org.enso.pkg.QualifiedName
|
import org.enso.pkg.QualifiedName
|
||||||
|
import org.enso.common.RuntimeOptions
|
||||||
import org.enso.polyglot._
|
import org.enso.polyglot._
|
||||||
import org.enso.polyglot.runtime.Runtime.Api
|
import org.enso.polyglot.runtime.Runtime.Api
|
||||||
import org.enso.text.editing.model
|
import org.enso.text.editing.model
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.enso.interpreter.test.semantic
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.enso.interpreter.test.{InterpreterException, PackageTest}
|
import org.enso.interpreter.test.{InterpreterException, PackageTest}
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
|
|
||||||
class ImportsTest extends PackageTest {
|
class ImportsTest extends PackageTest {
|
||||||
implicit def messagingNatureOInterpreterException
|
implicit def messagingNatureOInterpreterException
|
||||||
|
@ -5,7 +5,7 @@ import org.enso.interpreter.test.{
|
|||||||
InterpreterException,
|
InterpreterException,
|
||||||
InterpreterTest
|
InterpreterTest
|
||||||
}
|
}
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.graalvm.polyglot.Context
|
import org.graalvm.polyglot.Context
|
||||||
|
|
||||||
class OverloadsResolutionErrorTest extends InterpreterTest {
|
class OverloadsResolutionErrorTest extends InterpreterTest {
|
||||||
|
@ -5,7 +5,7 @@ import org.enso.interpreter.test.{
|
|||||||
InterpreterException,
|
InterpreterException,
|
||||||
InterpreterTest
|
InterpreterTest
|
||||||
}
|
}
|
||||||
import org.enso.polyglot.RuntimeOptions
|
import org.enso.common.RuntimeOptions
|
||||||
import org.graalvm.polyglot.Context
|
import org.graalvm.polyglot.Context
|
||||||
|
|
||||||
class StrictCompileDiagnosticsTest extends InterpreterTest {
|
class StrictCompileDiagnosticsTest extends InterpreterTest {
|
||||||
|
@ -16,6 +16,7 @@ import java.io.PrintStream;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.Compiler;
|
import org.enso.compiler.Compiler;
|
||||||
import org.enso.compiler.context.InlineContext;
|
import org.enso.compiler.context.InlineContext;
|
||||||
import org.enso.compiler.context.LocalScope;
|
import org.enso.compiler.context.LocalScope;
|
||||||
@ -43,7 +44,6 @@ import org.enso.interpreter.runtime.tag.Patchable;
|
|||||||
import org.enso.interpreter.util.FileDetector;
|
import org.enso.interpreter.util.FileDetector;
|
||||||
import org.enso.lockmanager.client.ConnectedLockManager;
|
import org.enso.lockmanager.client.ConnectedLockManager;
|
||||||
import org.enso.logger.masking.MaskingFactory;
|
import org.enso.logger.masking.MaskingFactory;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.syntax2.Line;
|
import org.enso.syntax2.Line;
|
||||||
import org.enso.syntax2.Tree;
|
import org.enso.syntax2.Tree;
|
||||||
import org.graalvm.options.OptionCategory;
|
import org.graalvm.options.OptionCategory;
|
||||||
|
@ -5,7 +5,7 @@ import com.oracle.truffle.api.TruffleLanguage;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
|
|
||||||
public final class OptionsHelper {
|
public final class OptionsHelper {
|
||||||
private OptionsHelper() {}
|
private OptionsHelper() {}
|
||||||
|
@ -37,6 +37,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.compiler.Compiler;
|
import org.enso.compiler.Compiler;
|
||||||
import org.enso.compiler.data.CompilerConfig;
|
import org.enso.compiler.data.CompilerConfig;
|
||||||
import org.enso.distribution.DistributionManager;
|
import org.enso.distribution.DistributionManager;
|
||||||
@ -58,7 +59,6 @@ import org.enso.librarymanager.resolved.LibraryRoot;
|
|||||||
import org.enso.pkg.Package;
|
import org.enso.pkg.Package;
|
||||||
import org.enso.pkg.PackageManager;
|
import org.enso.pkg.PackageManager;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.enso.polyglot.debugger.IdExecutionService;
|
import org.enso.polyglot.debugger.IdExecutionService;
|
||||||
import org.graalvm.options.OptionKey;
|
import org.graalvm.options.OptionKey;
|
||||||
import scala.jdk.javaapi.OptionConverters;
|
import scala.jdk.javaapi.OptionConverters;
|
||||||
|
@ -12,8 +12,8 @@ import java.util.logging.Level;
|
|||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames.Module;
|
import org.enso.common.MethodNames.Module;
|
||||||
import org.enso.common.MethodNames.TopScope;
|
import org.enso.common.MethodNames.TopScope;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.interpreter.runtime.EnsoContext;
|
import org.enso.interpreter.runtime.EnsoContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Language;
|
import org.graalvm.polyglot.Language;
|
||||||
import org.graalvm.polyglot.Source;
|
import org.graalvm.polyglot.Source;
|
||||||
|
@ -8,9 +8,9 @@ import java.util.Comparator;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.QualifiedName;
|
import org.enso.pkg.QualifiedName;
|
||||||
import org.enso.polyglot.PolyglotContext;
|
import org.enso.polyglot.PolyglotContext;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Context.Builder;
|
import org.graalvm.polyglot.Context.Builder;
|
||||||
import org.graalvm.polyglot.Value;
|
import org.graalvm.polyglot.Value;
|
||||||
|
@ -8,7 +8,7 @@ import java.nio.file.Files;
|
|||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the path to the {@link org.enso.polyglot.RuntimeOptions#LANGUAGE_HOME_OVERRIDE language
|
* Returns the path to the {@link org.enso.common.RuntimeOptions#LANGUAGE_HOME_OVERRIDE language
|
||||||
* home override directory}.
|
* home override directory}.
|
||||||
*
|
*
|
||||||
* <p>Note that the returned file may not exist.
|
* <p>Note that the returned file may not exist.
|
||||||
|
@ -21,7 +21,7 @@ import org.enso.benchmarks.ModuleBenchSuite;
|
|||||||
import org.enso.benchmarks.Utils;
|
import org.enso.benchmarks.Utils;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames.TopScope;
|
import org.enso.common.MethodNames.TopScope;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.PolyglotException;
|
import org.graalvm.polyglot.PolyglotException;
|
||||||
import org.graalvm.polyglot.Value;
|
import org.graalvm.polyglot.Value;
|
||||||
@ -66,7 +66,7 @@ public class BenchProcessor extends AbstractProcessor {
|
|||||||
"import org.graalvm.polyglot.io.IOAccess;",
|
"import org.graalvm.polyglot.io.IOAccess;",
|
||||||
"import org.enso.common.LanguageInfo;",
|
"import org.enso.common.LanguageInfo;",
|
||||||
"import org.enso.common.MethodNames;",
|
"import org.enso.common.MethodNames;",
|
||||||
"import org.enso.polyglot.RuntimeOptions;",
|
"import org.enso.common.RuntimeOptions;",
|
||||||
"import org.enso.benchmarks.processor.SpecCollector;",
|
"import org.enso.benchmarks.processor.SpecCollector;",
|
||||||
"import org.enso.benchmarks.ModuleBenchSuite;",
|
"import org.enso.benchmarks.ModuleBenchSuite;",
|
||||||
"import org.enso.benchmarks.BenchSpec;",
|
"import org.enso.benchmarks.BenchSpec;",
|
||||||
|
@ -13,8 +13,8 @@ import java.util.List;
|
|||||||
import org.enso.benchmarks.processor.SpecCollector;
|
import org.enso.benchmarks.processor.SpecCollector;
|
||||||
import org.enso.common.LanguageInfo;
|
import org.enso.common.LanguageInfo;
|
||||||
import org.enso.common.MethodNames.TopScope;
|
import org.enso.common.MethodNames.TopScope;
|
||||||
|
import org.enso.common.RuntimeOptions;
|
||||||
import org.enso.pkg.PackageManager;
|
import org.enso.pkg.PackageManager;
|
||||||
import org.enso.polyglot.RuntimeOptions;
|
|
||||||
import org.graalvm.polyglot.Context;
|
import org.graalvm.polyglot.Context;
|
||||||
import org.graalvm.polyglot.Value;
|
import org.graalvm.polyglot.Value;
|
||||||
import org.graalvm.polyglot.io.IOAccess;
|
import org.graalvm.polyglot.io.IOAccess;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package org.enso.logger;
|
package org.enso.logger;
|
||||||
|
|
||||||
import static org.slf4j.event.Level.*;
|
import static org.slf4j.event.Level.DEBUG;
|
||||||
|
import static org.slf4j.event.Level.ERROR;
|
||||||
|
import static org.slf4j.event.Level.INFO;
|
||||||
|
import static org.slf4j.event.Level.TRACE;
|
||||||
|
import static org.slf4j.event.Level.WARN;
|
||||||
|
|
||||||
import org.slf4j.event.Level;
|
import org.slf4j.event.Level;
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
CEACB200CB0700395F9105E8F16462D5DCDAC671A85BC06C502A92FCFE9EDB3D
|
6C4CE7219F6329519E17E044BB32CFD43391B022D686B5BDCF6421E03DFC4858
|
||||||
1CCB55F023131497A0E6A16BB5B2D63E5D842572D8638017816EF1D5474B0169
|
1CCB55F023131497A0E6A16BB5B2D63E5D842572D8638017816EF1D5474B0169
|
||||||
0
|
0
|
||||||
|
Loading…
Reference in New Issue
Block a user