diff --git a/build.sbt b/build.sbt index 17d5a6e7b4..a5ed250e3f 100644 --- a/build.sbt +++ b/build.sbt @@ -385,6 +385,7 @@ lazy val enso = (project in file(".")) `test-utils`, `text-buffer`, `version-output`, + ydoc, `ydoc-server`, `zio-wrapper` ) @@ -1885,8 +1886,8 @@ lazy val searcher = project .dependsOn(testkit % Test) .dependsOn(`polyglot-api`) -lazy val `ydoc-server` = project - .in(file("lib/java/ydoc-server")) +lazy val ydoc = project + .in(file("lib/java/ydoc")) .enablePlugins(JPMSPlugin) .configs(Test) .settings( @@ -1897,14 +1898,50 @@ lazy val `ydoc-server` = project autoScalaLibrary := false, Test / fork := true, commands += WithDebugCommand.withDebug, + Compile / moduleDependencies ++= { + GraalVM.modules ++ GraalVM.jsPkgs ++ GraalVM.chromeInspectorPkgs ++ helidon ++ Seq( + "org.slf4j" % "slf4j-api" % slf4jVersion + ) + }, + Compile / internalModuleDependencies := Seq( + (`syntax-rust-definition` / Compile / exportedModule).value + ), + libraryDependencies ++= Seq( + "org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided", + "org.graalvm.polyglot" % "inspect-community" % graalMavenPackagesVersion % "runtime", + "org.graalvm.polyglot" % "js-community" % graalMavenPackagesVersion % "runtime", + "org.slf4j" % "slf4j-api" % slf4jVersion, + "io.helidon.webclient" % "helidon-webclient-websocket" % helidonVersion, + "io.helidon.webserver" % "helidon-webserver-websocket" % helidonVersion, + "junit" % "junit" % junitVersion % Test, + "com.github.sbt" % "junit-interface" % junitIfVersion % Test + ), + libraryDependencies ++= { + GraalVM.modules ++ GraalVM.jsPkgs ++ GraalVM.chromeInspectorPkgs ++ helidon + } + ) + .dependsOn(`syntax-rust-definition`) + +lazy val `ydoc-server` = project + .in(file("lib/java/ydoc-server")) + .enablePlugins(JPMSPlugin) + .configs(Test) + .settings( + customFrgaalJavaCompilerSettings("21"), + javaModuleName := "org.enso.ydoc.server", + Compile / exportJars := true, + crossPaths := false, + autoScalaLibrary := false, + Test / fork := true, + commands += WithDebugCommand.withDebug, Compile / moduleDependencies ++= { GraalVM.modules ++ GraalVM.jsPkgs ++ GraalVM.chromeInspectorPkgs ++ helidon ++ logbackPkg ++ Seq( "org.slf4j" % "slf4j-api" % slf4jVersion ) }, Compile / internalModuleDependencies := Seq( - (`syntax-rust-definition` / Compile / exportedModule).value, - (`profiling-utils` / Compile / exportedModule).value + (ydoc / Compile / exportedModule).value, + (`syntax-rust-definition` / Compile / exportedModule).value ), libraryDependencies ++= Seq( "org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided", @@ -1912,8 +1949,9 @@ lazy val `ydoc-server` = project "org.graalvm.polyglot" % "inspect-community" % graalMavenPackagesVersion % "runtime", "org.graalvm.polyglot" % "js-community" % graalMavenPackagesVersion % "runtime", "org.slf4j" % "slf4j-api" % slf4jVersion, - "io.helidon.webclient" % "helidon-webclient-websocket" % helidonVersion, - "io.helidon.webserver" % "helidon-webserver-websocket" % helidonVersion, + "io.helidon.common" % "helidon-common" % helidonVersion, + "io.helidon.webclient" % "helidon-webclient-websocket" % helidonVersion % Test, + "io.helidon.webserver" % "helidon-webserver-websocket" % helidonVersion % Test, "junit" % "junit" % junitVersion % Test, "com.github.sbt" % "junit-interface" % junitIfVersion % Test, "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % Test @@ -1936,8 +1974,7 @@ lazy val `ydoc-server` = project // would result in an sbt caught in an infinite recursion. // Compile / run / javaOptions ++= { - val mp = - (Compile / modulePath).value ++ (`profiling-utils` / Compile / modulePath).value + val mp = (Compile / modulePath).value val jar = (Compile / exportedProductJars).value.head val modName = javaModuleName.value val allMp = mp ++ Seq(jar.data.absolutePath) @@ -1969,7 +2006,7 @@ lazy val `ydoc-server` = project .buildNativeImage( "ydoc", staticOnLinux = false, - mainClass = Some("org.enso.ydoc.Main") + mainClass = Some("org.enso.ydoc.server.Main") ) .value, buildNativeImage := NativeImage @@ -1979,7 +2016,7 @@ lazy val `ydoc-server` = project ) .value ) - .dependsOn(`syntax-rust-definition`) + .dependsOn(ydoc) .dependsOn(`logging-service-logback`) lazy val `persistance` = (project in file("lib/java/persistance")) diff --git a/lib/java/ydoc-server/src/main/java/module-info.java b/lib/java/ydoc-server/src/main/java/module-info.java index 238adbca83..fea5bd3b3d 100644 --- a/lib/java/ydoc-server/src/main/java/module-info.java +++ b/lib/java/ydoc-server/src/main/java/module-info.java @@ -1,14 +1,9 @@ -module org.enso.ydoc { - requires io.helidon.webclient; - requires io.helidon.webclient.websocket; - requires io.helidon.webserver; - requires io.helidon.webserver.websocket; - requires org.enso.syntax; +module org.enso.ydoc.server { + requires io.helidon.common; + requires org.enso.ydoc; requires org.graalvm.polyglot; requires org.slf4j; requires static org.graalvm.nativeimage; - opens org.enso.ydoc.polyfill.web; - - exports org.enso.ydoc; + exports org.enso.ydoc.server; } diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/Main.java b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Main.java similarity index 96% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/Main.java rename to lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Main.java index adf36cb7e9..f205882dad 100644 --- a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/Main.java +++ b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Main.java @@ -1,4 +1,4 @@ -package org.enso.ydoc; +package org.enso.ydoc.server; import java.util.concurrent.Semaphore; diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/Ydoc.java b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Ydoc.java similarity index 99% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/Ydoc.java rename to lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Ydoc.java index 228eed0b77..379ccee2bf 100644 --- a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/Ydoc.java +++ b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/Ydoc.java @@ -1,4 +1,4 @@ -package org.enso.ydoc; +package org.enso.ydoc.server; import java.io.IOException; import java.util.concurrent.CompletableFuture; diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_ExecutorsFactory.java b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_ExecutorsFactory.java similarity index 94% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_ExecutorsFactory.java rename to lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_ExecutorsFactory.java index ff1b5fe110..cab765867e 100644 --- a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_ExecutorsFactory.java +++ b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_ExecutorsFactory.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.polyfill.web; +package org.enso.ydoc.server.nativeimage; import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_LoomClient.java b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_LoomClient.java similarity index 95% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_LoomClient.java rename to lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_LoomClient.java index 13e44c486d..6157591b9f 100644 --- a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Target_LoomClient.java +++ b/lib/java/ydoc-server/src/main/java/org/enso/ydoc/server/nativeimage/Target_LoomClient.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.polyfill.web; +package org.enso.ydoc.server.nativeimage; import com.oracle.svm.core.annotate.Alias; import com.oracle.svm.core.annotate.RecomputeFieldValue; diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/FileListResult.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/FileListResult.java deleted file mode 100644 index 92e8da00dd..0000000000 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/FileListResult.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.enso.ydoc.jsonrpc.model.result; - -import java.util.List; -import org.enso.ydoc.jsonrpc.model.FileSystemObject; - -public record FileListResult(List paths) implements Result {} diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/Result.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/Result.java deleted file mode 100644 index f94dd6f493..0000000000 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/Result.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.enso.ydoc.jsonrpc.model.result; - -public interface Result {} diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/YdocTest.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/YdocTest.java similarity index 92% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/YdocTest.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/YdocTest.java index 05a0355378..a09b747f10 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/YdocTest.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/YdocTest.java @@ -1,4 +1,4 @@ -package org.enso.ydoc; +package org.enso.ydoc.server; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -18,15 +18,15 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import org.enso.ydoc.jsonrpc.JsonRpcRequest; -import org.enso.ydoc.jsonrpc.JsonRpcResponse; -import org.enso.ydoc.jsonrpc.model.ContentRoot; -import org.enso.ydoc.jsonrpc.model.FilePath; -import org.enso.ydoc.jsonrpc.model.FileSystemObject; -import org.enso.ydoc.jsonrpc.model.WriteCapability; -import org.enso.ydoc.jsonrpc.model.result.FileListResult; -import org.enso.ydoc.jsonrpc.model.result.InitProtocolConnectionResult; -import org.enso.ydoc.jsonrpc.model.result.TextOpenFileResult; +import org.enso.ydoc.server.jsonrpc.JsonRpcRequest; +import org.enso.ydoc.server.jsonrpc.JsonRpcResponse; +import org.enso.ydoc.server.jsonrpc.model.ContentRoot; +import org.enso.ydoc.server.jsonrpc.model.FilePath; +import org.enso.ydoc.server.jsonrpc.model.FileSystemObject; +import org.enso.ydoc.server.jsonrpc.model.WriteCapability; +import org.enso.ydoc.server.jsonrpc.model.result.FileListResult; +import org.enso.ydoc.server.jsonrpc.model.result.InitProtocolConnectionResult; +import org.enso.ydoc.server.jsonrpc.model.result.TextOpenFileResult; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcRequest.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcRequest.java similarity index 78% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcRequest.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcRequest.java index c28722cfda..3400f06df5 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcRequest.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcRequest.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.jsonrpc; +package org.enso.ydoc.server.jsonrpc; import com.fasterxml.jackson.databind.JsonNode; diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcResponse.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcResponse.java similarity index 77% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcResponse.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcResponse.java index f446e2fc4c..2fd67b711f 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/JsonRpcResponse.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/JsonRpcResponse.java @@ -1,6 +1,6 @@ -package org.enso.ydoc.jsonrpc; +package org.enso.ydoc.server.jsonrpc; -import org.enso.ydoc.jsonrpc.model.result.Result; +import org.enso.ydoc.server.jsonrpc.model.result.Result; public record JsonRpcResponse(String jsonrpc, String id, Result result) { diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/ContentRoot.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/ContentRoot.java similarity index 79% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/ContentRoot.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/ContentRoot.java index 74fc9d13ef..7021f96c15 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/ContentRoot.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/ContentRoot.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.jsonrpc.model; +package org.enso.ydoc.server.jsonrpc.model; import java.util.UUID; diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FilePath.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FilePath.java similarity index 71% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FilePath.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FilePath.java index b1bff5849d..661ecd0653 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FilePath.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FilePath.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.jsonrpc.model; +package org.enso.ydoc.server.jsonrpc.model; import java.util.List; import java.util.UUID; diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FileSystemObject.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FileSystemObject.java similarity index 82% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FileSystemObject.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FileSystemObject.java index 4fdfbe2a6a..fd9174a487 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/FileSystemObject.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/FileSystemObject.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.jsonrpc.model; +package org.enso.ydoc.server.jsonrpc.model; public record FileSystemObject(String type, String name, FilePath path) { diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/WriteCapability.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/WriteCapability.java similarity index 72% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/WriteCapability.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/WriteCapability.java index abce6fef3a..153ef52555 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/WriteCapability.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/WriteCapability.java @@ -1,4 +1,4 @@ -package org.enso.ydoc.jsonrpc.model; +package org.enso.ydoc.server.jsonrpc.model; public record WriteCapability(String method, Options registerOptions) { diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/FileListResult.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/FileListResult.java new file mode 100644 index 0000000000..7f27853fa6 --- /dev/null +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/FileListResult.java @@ -0,0 +1,6 @@ +package org.enso.ydoc.server.jsonrpc.model.result; + +import java.util.List; +import org.enso.ydoc.server.jsonrpc.model.FileSystemObject; + +public record FileListResult(List paths) implements Result {} diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/InitProtocolConnectionResult.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/InitProtocolConnectionResult.java similarity index 61% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/InitProtocolConnectionResult.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/InitProtocolConnectionResult.java index 3a0dad0d39..226d219340 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/InitProtocolConnectionResult.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/InitProtocolConnectionResult.java @@ -1,7 +1,7 @@ -package org.enso.ydoc.jsonrpc.model.result; +package org.enso.ydoc.server.jsonrpc.model.result; import java.util.List; -import org.enso.ydoc.jsonrpc.model.ContentRoot; +import org.enso.ydoc.server.jsonrpc.model.ContentRoot; public record InitProtocolConnectionResult( String ensoVersion, String currentEdition, List contentRoots) implements Result {} diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/Result.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/Result.java new file mode 100644 index 0000000000..16e0058b05 --- /dev/null +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/Result.java @@ -0,0 +1,3 @@ +package org.enso.ydoc.server.jsonrpc.model.result; + +public interface Result {} diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/TextOpenFileResult.java b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/TextOpenFileResult.java similarity index 54% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/TextOpenFileResult.java rename to lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/TextOpenFileResult.java index 88c2317672..1bbd4ff752 100644 --- a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/jsonrpc/model/result/TextOpenFileResult.java +++ b/lib/java/ydoc-server/src/test/java/org/enso/ydoc/server/jsonrpc/model/result/TextOpenFileResult.java @@ -1,6 +1,6 @@ -package org.enso.ydoc.jsonrpc.model.result; +package org.enso.ydoc.server.jsonrpc.model.result; -import org.enso.ydoc.jsonrpc.model.WriteCapability; +import org.enso.ydoc.server.jsonrpc.model.WriteCapability; public record TextOpenFileResult( WriteCapability writeCapability, String content, String currentVersion) implements Result {} diff --git a/lib/java/ydoc/src/main/java/module-info.java b/lib/java/ydoc/src/main/java/module-info.java new file mode 100644 index 0000000000..83e5d90409 --- /dev/null +++ b/lib/java/ydoc/src/main/java/module-info.java @@ -0,0 +1,14 @@ +module org.enso.ydoc { + requires io.helidon.webclient; + requires io.helidon.webclient.websocket; + requires io.helidon.webserver; + requires io.helidon.webserver.websocket; + requires org.enso.syntax; + requires org.graalvm.polyglot; + requires org.slf4j; + + opens org.enso.ydoc.polyfill.web; + + exports org.enso.ydoc.polyfill; + exports org.enso.ydoc.polyfill.web; +} diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/Polyfill.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/Polyfill.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/Polyfill.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/Polyfill.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/Arguments.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/Arguments.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/Arguments.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/Arguments.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/ParserPolyfill.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/ParserPolyfill.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/ParserPolyfill.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/ParserPolyfill.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/AbortController.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/AbortController.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/AbortController.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/AbortController.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Crypto.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Crypto.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Crypto.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Crypto.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/EventEmitter.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/EventEmitter.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/EventEmitter.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/EventEmitter.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/EventTarget.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/EventTarget.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/EventTarget.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/EventTarget.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Performance.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Performance.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Performance.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Performance.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Timers.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Timers.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Timers.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Timers.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/URL.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/URL.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/URL.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/URL.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Util.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Util.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Util.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Util.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/WebEnvironment.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/WebEnvironment.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/WebEnvironment.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/WebEnvironment.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/WebSocket.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/WebSocket.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/WebSocket.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/WebSocket.java diff --git a/lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Zlib.java b/lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Zlib.java similarity index 100% rename from lib/java/ydoc-server/src/main/java/org/enso/ydoc/polyfill/web/Zlib.java rename to lib/java/ydoc/src/main/java/org/enso/ydoc/polyfill/web/Zlib.java diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/parser.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/parser.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/parser.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/parser.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/abort-controller.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/abort-controller.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/abort-controller.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/abort-controller.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/crypto.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/crypto.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/crypto.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/crypto.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/event-emitter.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/event-emitter.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/event-emitter.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/event-emitter.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/event-target.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/event-target.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/event-target.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/event-target.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/performance.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/performance.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/performance.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/performance.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/timers.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/timers.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/timers.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/timers.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/util.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/util.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/util.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/util.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/websocket.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/websocket.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/websocket.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/websocket.js diff --git a/lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/zlib.js b/lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/zlib.js similarity index 100% rename from lib/java/ydoc-server/src/main/resources/org/enso/ydoc/polyfill/web/zlib.js rename to lib/java/ydoc/src/main/resources/org/enso/ydoc/polyfill/web/zlib.js diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/ExecutorSetup.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/ExecutorSetup.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/ExecutorSetup.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/ExecutorSetup.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/ParserPolyfillTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/ParserPolyfillTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/ParserPolyfillTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/ParserPolyfillTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/AbortControllerTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/AbortControllerTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/AbortControllerTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/AbortControllerTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/CryptoTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/CryptoTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/CryptoTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/CryptoTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/EventEmitterTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/EventEmitterTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/EventEmitterTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/EventEmitterTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/EventTargetTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/EventTargetTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/EventTargetTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/EventTargetTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/PerformanceTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/PerformanceTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/PerformanceTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/PerformanceTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/TimersTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/TimersTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/TimersTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/TimersTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/UtilTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/UtilTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/UtilTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/UtilTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/WebSocketServerTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/WebSocketServerTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/WebSocketServerTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/WebSocketServerTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/WebSocketTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/WebSocketTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/WebSocketTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/WebSocketTest.java diff --git a/lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/ZlibTest.java b/lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/ZlibTest.java similarity index 100% rename from lib/java/ydoc-server/src/test/java/org/enso/ydoc/polyfill/web/ZlibTest.java rename to lib/java/ydoc/src/test/java/org/enso/ydoc/polyfill/web/ZlibTest.java diff --git a/lib/java/ydoc/src/test/resources/logback-test.xml b/lib/java/ydoc/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..3ce331ce1a --- /dev/null +++ b/lib/java/ydoc/src/test/resources/logback-test.xml @@ -0,0 +1,17 @@ + + + + + + + + + + %d{HH:mm:ss.SSS} [%-15thread] %-5level %logger{36} %msg%n + + + + + + + diff --git a/project/Ydoc.scala b/project/Ydoc.scala index 762e3b0ecc..dbb6e5b0b9 100644 --- a/project/Ydoc.scala +++ b/project/Ydoc.scala @@ -50,7 +50,7 @@ object Ydoc { val generator = Tracked.inputChanged[Seq[File], Seq[File]](store) { case (changed, _) => val resourceYdocServerJs = - ydocServerResourceManaged / "org" / "enso" / "ydoc" / "ydoc.cjs" + ydocServerResourceManaged / "org" / "enso" / "ydoc" / "server" / "ydoc.cjs" if (changed) { val command = s"$pnpmCommand -r compile"