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

Automatic generation of the binary protocol handler in GUI #9658

Open
mwu-tow opened this issue Apr 9, 2024 · 0 comments
Open

Automatic generation of the binary protocol handler in GUI #9658

mwu-tow opened this issue Apr 9, 2024 · 0 comments
Labels
-gui d-hard Difficulty: significant prior knowledge required p-low Low priority s-research-needed Status: the task will require heavy research to complete x-refactor Changes that should not be visible to the end-user

Comments

@mwu-tow
Copy link
Contributor

mwu-tow commented Apr 9, 2024

GUI and Language Server use FLatBuffers for binary communication. The protocol is defined by the schema file, which can be compiled with flatc to generate the necessary code in any supported language.

However, the GUI does not use the generated code directly. Instead, its protocol client is based on the generated TypeScript code, which was later modified by hand to improve type safety, usability and performance. This however makes it impossible to automatically update the generated code, in case the protocol changes.

This problem should be addressed but the exact solution is not clear. Perhaps a different protocol library should be used (or even our own parser's binary protocol) — but this needs to be decided between the teams.

@mwu-tow mwu-tow added the -gui label Apr 9, 2024
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Apr 9, 2024
@farmaazon farmaazon added d-hard Difficulty: significant prior knowledge required s-research-needed Status: the task will require heavy research to complete x-refactor Changes that should not be visible to the end-user p-low Low priority labels Apr 11, 2024
@farmaazon farmaazon moved this from ❓New to 📤 Backlog in Issues Board Apr 11, 2024
mergify bot pushed a commit that referenced this issue Apr 12, 2024
This PR bumps the FlatBuffers version used by the backend to `24.3.25` (the latest version as of now).

Since the newer FlatBuffers releases come with prebuilt binaries for all platforms we target, we can simplify the build process by simply downloading the required `flatc` binary from the official FlatBuffers GitHub release page. This allows us to remove the dependency on `conda`, which was the only reliable way to get the outdated `flatc`.

The `conda` setup has been removed from the CI steps and the relevant code has been removed from the build script.

The FlatBuffers version is no longer hard-coded in the Rust build script, it is inferred from the `build.sbt` definition (similar to GraalVM).

# Important Notes
This does not affect the GUI binary protocol implementation.

While I initially wanted to update it, it turned out farly non-trivial.

As there are multiple issues with the generated TS code, it was significantly refactored by hand and it is impossible to automatically update it. Work to address this problem is left as [a future task](#9658).

As the Flatbuffers binary protocol is guaranteed to be compatible between versions (unlike the generated sources), there should be no adverse effects from bumping `flatc` only on the backend side.
@somebody1234 somebody1234 added p-highest Should be completed ASAP and removed p-low Low priority labels Apr 29, 2024
@AdRiley AdRiley added this to the Beta Release milestone Apr 29, 2024
@somebody1234 somebody1234 added p-low Low priority and removed p-highest Should be completed ASAP labels Apr 29, 2024
@AdRiley AdRiley removed this from the Beta Release milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui d-hard Difficulty: significant prior knowledge required p-low Low priority s-research-needed Status: the task will require heavy research to complete x-refactor Changes that should not be visible to the end-user
Projects
Status: 📤 Backlog
Development

No branches or pull requests

4 participants