-
Notifications
You must be signed in to change notification settings - Fork 328
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 to execute Y.js and Insight together #11477
Comments
@Frizi, @4e6 I guess it is time to specify what:
shall mean? I've just tried
Is that correct assumption guys? Then the whole script would be: enso$ sbt ydoc-server/test
enso$ export ENSO_JVM_OPTS=-Denso.dev.insight=`pwd`/lib/java/ydoc-server/target/classes/org/enso/ydoc/server/ydoc.cjs
enso$ sbt runProjectManagerDistribution and launching IDE in another terminal as |
With
We need to modify ContextInsightSetup to emulate necessary JS environment as provided by Created a #11822 PR to turn on the |
Once I asked Where is the (type script?) code representing an AST element? Is there information about offset/length? What code needs to be added lib/java/ydoc-server/target/classes/org/enso/ydoc/server/ydoc.cjs to print all AST that shall be updated with expressionUpdates and their offset/length? Having a diff doing this printing would be a good entry point for me. @Frizi wrote:
|
I was not able to get enough information from the insight script to prepare update messages that could be exchanged with GUI. For example, insight.on("return", function(ctx, frame) {
print(`[return] ctx='${JSON.stringify(ctx)}'`)
print(`[return] frame='${JSON.stringify(frame)}'`)
}, {
expressions: true,
statements: true,
roots: true,
rootNameFilter: ".*main"
});
|
If the issue is just about running
|
The goal I'd like to see is:
Btw. Use
|
Dmitry Bushev reports a new STANDUP for yesterday (2024-12-26): Progress: [11477] Added ability to debug JS in Chrome Dev Tools. Implemented parsing of the span map. Implemented setting of the ast metadata from the insight script. It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Dmitry Bushev reports a new STANDUP for today (2024-12-27): Progress: [11477] Debugging the ast representation in chrome inspector. Fixed an issue with re-setting the metadata. Looking into Yjs connection to ydoc server. It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Do you mean something other than |
Dmitry Bushev reports a new STANDUP for the provided date (2024-12-30): Progress: [10923] Looking into performance regression. Removed the truffle boundaries. Updated the PR. Trying to produce the nodes graph for an alternative fix [11477] Started implementing the logic that attaches the Yjs websocket provider. It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Dmitry Bushev reports a new STANDUP for yesterday (2024-12-31): Progress: [11477] Implemented the Yjs provider that connects to Ydoc and listens to subdocks to mimic the gui behavior. Debugging issues with the websocket connection. It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Dmitry Bushev reports a new STANDUP for yesterday (2025-01-01): Progress: [11938] Inspecting the truffle asts to discover differences in AtomConstructor implementation. Re-running benchmarks. Merged the PR [11477] Debugging the Yjs websocket provider. It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Dmitry Bushev reports a new STANDUP for today (2025-01-02): Progress: [11477] Debugging the websocket implementation. Fixed an issue with establishing the connection. Debugging the issue with reading the response. Reduced the test example to a simple websocket connection. Created a draft PR It should be finished by 2025-01-03. Next Day: Next day I will be working on the #11477 task. Continue working on the task |
Since the implementation of reload insight script on file change we have a nice and comfortable way to execute Enso Insight scripts like Detect Assign Statements in the IDE and observe how engine executes the code.
The next step is to connect Y.js and Insight together. Let's do it like this:
ydoc-server
module.ContextInsightSetup
via theepb
language:It is essential to use
epb
language as it sets a proper inner context for JavaScript rather than trying to execute JavaScript directly (as it is not ready for multi threaded access).ydoc-polyfill
when running backend with the IDE #11822At the end please demonstrate how a simple script showing co-operation between Enso Insight and Y.js structures can be created and used in the IDE via
-Denso.dev.insight
property.The text was updated successfully, but these errors were encountered: