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

Allow access to caches and instrumentation from Enso #7683

Closed
3 tasks done
JaroslavTulach opened this issue Aug 29, 2023 · 5 comments · Fixed by #7833
Closed
3 tasks done

Allow access to caches and instrumentation from Enso #7683

JaroslavTulach opened this issue Aug 29, 2023 · 5 comments · Fixed by #7833
Assignees
Labels
-ai tasks for adding ChatGPT based suggestions -compiler -libs Libraries: New libraries to be implemented -polyglot Polyglot related tasks

Comments

@JaroslavTulach
Copy link
Member

JaroslavTulach commented Aug 29, 2023

There are various issues related to current implementation of language server:

While thinking about these issues I concluded that it would be better expose the core of runtime caching & instrumentation functionality to Enso programs and use it from visualizations. The plan is to create a builtin type that would allow instrumentation of certain nodes and registration of functions to receive a callback when a node or expression evaluation is started and finished. The callback would receive the actual values flowing thru the program and could control (invalidate) the runtime cache whenever needed.

Exposing these caching & instrumentation functionality would create simple, low-level API that could easily be used to emulate the current behavior and even more easily expand it when needed. Caching & instrumentation related activities shall be as simple as writing a visualization.

We need to spend some time and investigate whether this is a viable approach. Prior work however indicates this is doable and fully functional. There is GraalVM Insight which exposes the instrumentation capabilities to scripting language. We know that GraalVM Insight works with Enso, however following should be investigated:

Tasks

Preview Give feedback
@JaroslavTulach JaroslavTulach added -compiler -libs Libraries: New libraries to be implemented -ai tasks for adding ChatGPT based suggestions -polyglot Polyglot related tasks labels Aug 29, 2023
@JaroslavTulach JaroslavTulach self-assigned this Aug 29, 2023
@JaroslavTulach
Copy link
Member Author

Making Standard.Visualization Part of the IDE

In the light of #7692 discussion and to solve the #7639 problems, let's consider following: Let's make the Standard.Visualization Enso library part of the IDE.

What problem this addresses?

The IDE contains built-in JavaScript parts of the visualizations that expect certain functions in Standard.Visualization. Currently Standard.Visualization is distributed as part of engine. As a result the IDE is tight to the exact version of engine it can work with - otherwise JavaScript parts of visualization will not find the right methods.

By packaging and distributing Standard.Visualization as part of the IDE we avoid mismatch with their JavaScript counter parts. They will always work together.

What is Needed?
  • the IDE needs to tell the engine about a special repository that it should download Standard.Visualization & co. from
  • so that modules used by VisualizationConfiguration can access modules from the special repository

@JaroslavTulach
Copy link
Member Author

Making Language Server Part of the IDE

In the light of #7692 discussion and to solve the #7639 problems, let's consider following: Let's repackage current implementation of language server as Enso library!

What problem this addresses?

Currently the language server is bundled together with the Enso engine in enso-engine bundle. That requires us to version the language server protocol properly, negotiate at the beginning of the session the version that IDE requires and the version engine provides and reject co-operation between these two, when they don't match. The user can then either downgrade the IDE or upgrade the engine or vice versa.

By packaging the language server implementation as an Enso library Standard.Language_Server and bundling it together with the IDE we will always guarantee the he language server protocol version required by the IDE is the same as the one supported by the Standard.Language_Server library.

What is Needed?
  • the IDE needs to tell the engine about a special repository that it should download Standard.Language_Server from
  • the IDE needs to tell the project-manager to activate/start main method of Standard.Language_Server when launching engine
  • Standard.Language_Server needs access to instrumentation and caches from the engine

@JaroslavTulach JaroslavTulach changed the title Demonstrate access to caches and instrumentation from Enso Allow access to caches and instrumentation from Enso Aug 30, 2023
@4e6
Copy link
Contributor

4e6 commented Aug 30, 2023

Making Language Server Part of the IDE

the IDE needs to tell the engine about a special repository that it should download Standard.Language_Server from

We already ship IDE with the project manager. We should package the language server with IDE instead of downloading it.

@JaroslavTulach JaroslavTulach moved this from ❓New to ⚙️ Design in Issues Board Aug 31, 2023
@JaroslavTulach JaroslavTulach moved this from ⚙️ Design to 👁️ Code review in Issues Board Sep 15, 2023
mergify bot pushed a commit that referenced this issue Sep 15, 2023
As part of investigation of #7683, let's make `IdExecutionEventNode` smaller by having a reference to factory and its fields.
@jdunkerley jdunkerley moved this from 👁️ Code review to 🟢 Accepted in Issues Board Sep 26, 2023
@jdunkerley jdunkerley moved this from 🟢 Accepted to 👁️ Code review in Issues Board Sep 26, 2023
@enso-bot
Copy link

enso-bot bot commented Oct 6, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-10-05):

Progress: - more robust instrumentor: 6352d53

Next Day: Bugfixing, websocket polyfill

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

@enso-bot
Copy link

enso-bot bot commented Oct 7, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-10-06):

Progress: - META-DATA fighting: #7989

Next Day: Bugfixing, websocket polyfill

@mergify mergify bot closed this as completed in #7833 Oct 10, 2023
mergify bot pushed a commit that referenced this issue Oct 10, 2023
Exposing instrumentation capabilities to Enso. Fixes #7683.
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-ai tasks for adding ChatGPT based suggestions -compiler -libs Libraries: New libraries to be implemented -polyglot Polyglot related tasks
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants