Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
JaroslavTulach opened this issue Nov 2, 2023 · 5 comments · Fixed by #8847
Closed
1 of 2 tasks

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

JaroslavTulach opened this issue Nov 2, 2023 · 5 comments · Fixed by #8847
Assignees
Labels
-compiler -tooling Category: tooling

Comments

@JaroslavTulach
Copy link
Member

JaroslavTulach commented Nov 2, 2023

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:

  • fansi - used to print colorified output on various terminals
  • Truffle - reusing Source and SourceSection

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

Preview Give feedback
@Akirathan
Copy link
Member

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
Copy link
Member

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

@Akirathan Akirathan moved this from 📤 Backlog to 🔧 Implementation in Issues Board Jan 24, 2024
@Akirathan Akirathan moved this from 🔧 Implementation to ⚙️ Design in Issues Board Jan 24, 2024
@Akirathan Akirathan moved this from ⚙️ Design to 🔧 Implementation in Issues Board Jan 25, 2024
@enso-bot
Copy link

enso-bot bot commented Jan 26, 2024

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

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

  • Finally merged the Table_Test refactoring PR
  • Slowly removing all other Truffle stuff from runtime-compiler. It should be finished by 2024-02-02.

@Akirathan
Copy link
Member

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

@Akirathan Akirathan moved this from 🔧 Implementation to 👁️ Code review in Issues Board Jan 29, 2024
@enso-bot
Copy link

enso-bot bot commented Feb 1, 2024

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

Progress: - Revival of #8764

@mergify mergify bot closed this as completed in #8847 Feb 2, 2024
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler -tooling Category: tooling
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants