enso-org / enso

Hybrid visual and textual functional programming.
https://ensoanalytics.com
Apache License 2.0
7.36k stars 324 forks source link

Avoid heavyweight (fansi, Truffle) runtime-compiler dependencies #8210

Closed JaroslavTulach closed 8 months ago

JaroslavTulach commented 11 months ago

The engine/runtime-compiler project introduced by #8197 contains the static IR compiler able to produce error diagnostics useful in any advanced text editor. In order to simplify embedding of this part of Enso, we want to make sure the runtime-compiler project isn't heavyweight - e.g. it doesn't carry unnecessary dependencies. Currently it does:

The idea is to create another project runtime-error-reports and move the fansi functionality there. Or just move it to engine/runtime (for now). The same for Truffle. Once these abstractions are made, we can continue work on:

### Tasks
- [x] Abstract fansi functionality in `runtime-compiler`
- [ ] Abstract Truffle dependencies in `runtime-compiler` - #8888
Akirathan commented 11 months ago

Remove truffle-api from runtime-compiler and runtime-parser projects:

diff --git a/build.sbt b/build.sbt
index e219b193e..28ea45704 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1517,7 +1517,6 @@ lazy val `runtime-parser` =
   (project in file("engine/runtime-parser"))
     .settings(
       frgaalJavaCompilerSetting,
-      instrumentationSettings,
       commands += WithDebugCommand.withDebug,
       fork := true,
       Test / javaOptions ++= Seq(
@@ -1540,7 +1539,6 @@ lazy val `runtime-compiler` =
   (project in file("engine/runtime-compiler"))
     .settings(
       frgaalJavaCompilerSetting,
-      instrumentationSettings,
       libraryDependencies ++= Seq(
         "junit"            % "junit"                   % junitVersion       % Test,
         "com.github.sbt"   % "junit-interface"         % junitIfVersion     % Test,
Akirathan commented 9 months ago

Remove fansi by introducing a method like CompilerContext.reportDiagnostics and implementing it in runtime.

enso-bot[bot] commented 9 months ago

Pavel Marek reports a new STANDUP for today (2024-01-26):

Progress: - fansi dependency is already removed from runtime-compiler.

Akirathan commented 8 months ago

I have just moved the "Abstract Truffle dependencies in runtime-compiler" part into another issue - #8888

enso-bot[bot] commented 8 months ago

Pavel Marek reports a new STANDUP for today (2024-02-01):

Progress: - Revival of https://github.com/enso-org/enso/pull/8764