-
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
Ydoc library #11615
Ydoc library #11615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really like to see #11477 addressed in this PR. There is one essential and one verification step:
- modify ContextInsightSetup to enable ydoc polyfills that are provided by the newly defined
ydoc
(as named currently) library - verify (maybe just manually) that the generated
ydoc.cjs
can be specified by-Denso.dev.insight
property, loads correctly and runs the wayYdoc
is supposed to run
Can we move forward with #11477, please?
build.sbt
Outdated
@@ -1885,13 +1886,49 @@ lazy val searcher = project | |||
.dependsOn(testkit % Test) | |||
.dependsOn(`polyglot-api`) | |||
|
|||
lazy val ydoc = project | |||
.in(file("lib/java/ydoc")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is called ydoc
? The library itself has nothing to do with ydoc
, it is websocket and other node.js APIs polyfill necessary to execute ydoc on JVM.
Maybe ydoc-polyfill
? Or polyfills4ydoc
? Or graal-js-polyfills
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ydoc-polyfill
it is
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow: So many jsonrpc
classes just for testing purposes!
I wasn't aware we have so many classes related to mock communication with language server. Do they mock the communication? What do they actually test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They need to emulate initialization message exchange with the language server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of the PR still contains:
Ydoc into ydoc library and ydoc-server server parts
Otherwise I think this is good.
`ydoc-server` compilation requires generation of `ydoc.cjs` resource that can take time and slow down the libraries development (building the enso distribution). This PR splits Ydoc into a library and the server part to avoid JS resources generation during the compilation of the language server. Changelog: - refactor: Ydoc into ~~`ydoc`~~ `ydoc-polyglot` library and `ydoc-server` server parts - update: language server to depend on the ~~`ydoc`~~ `ydoc-polyglot` library
Fixes the `sbt std-benchmarks/run` runtime module path. Before #11615 the `std-benchmarks` had `logging-service-logback` as a [transitive dependency of the `ydoc-server`](https://github.com/enso-org/enso/pull/11615/files#diff-5634c415cd8c8504fdb973a3ed092300b43c4b8fc1e184f7249eb29a55511f91L4052). Now is should be provided explicitly.
Pull Request Description
ydoc-server
compilation requires generation ofydoc.cjs
resource that can take time and slow down the libraries development (building the enso distribution). This PR splits Ydoc into a library and the server part to avoid JS resources generation during the compilation of the language server.Changelog:
ydoc
ydoc-polyglot
library andydoc-server
server partsydoc
ydoc-polyglot
libraryImportant Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.