-
Notifications
You must be signed in to change notification settings - Fork 323
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
Engine should send notification about node status #3729
Engine should send notification about node status #3729
Conversation
...rument-id-execution/src/main/java/org/enso/interpreter/instrument/IdExecutionInstrument.java
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/interpreter/instrument/job/EnsureCompiledJob.scala
Outdated
Show resolved
Hide resolved
285dd16
to
2c7652d
Compare
I still need to write some unit tests for the new message, but otherwise I believe this PR is ready for review. Thanks in advance for your opinions. |
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.
Checked the rust part.
...with-instruments/src/test/scala/org/enso/interpreter/test/instrument/RuntimeServerTest.scala
Show resolved
Hide resolved
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.
Looks ok. Things that can be improved here:
- sending message with a list of pending IDs would be more efficient, than a bunch of messages for each ID
- The
type
andmethodCall
of the newExpressionUpdate
message are always null (another reason for sending pending IDs in a batch). It should be at least documented in the protocol description
The change adds an additional field to `ExpressionUpdates` messages sent by `ProgramExecutionSupport` to indicate if the type of value (or its method pointer) has changed and therefore would potentially require a suggestions' update. Prior to #3729 that check was done during the instrumentation. However we still want to continue to support "pending expression" functionality therefore `SuggestionsHandler` will use the additional information to filter only the required expression updates. Most of the changes are related to adapting our tests to the new field. Closes #6707.
The change adds an additional field to `ExpressionUpdates` messages sent by `ProgramExecutionSupport` to indicate if the type of value (or its method pointer) has changed and therefore would potentially require a suggestions' update. Prior to #3729 that check was done during the instrumentation. However we still want to continue to support "pending expression" functionality therefore `SuggestionsHandler` will use the additional information to filter only the required expression updates. Most of the changes are related to adapting our tests to the new field. Closes #6706. # Important Notes The associated project now loads and navigates smoothly. Also attaching a screenshot from the project that illustrates that pending functionality continues to work: [Kazam_screencast_00006.webm](https://github.com/enso-org/enso/assets/292128/35918841-f84f-4e1c-b1b0-40e45d97e111)
Pull Request Description
When nodes get invalidated in the cache, they have to be recomputed. Let the IDE know which of the nodes are pending by sending
Api.ExpressionUpdate.Payload.Pending
message.Important Notes
This PR introduces new
Api.ExpressionUpdate.Payload.Pending
message. This message is delivered before re-computation of nodes. LaterApi.ExpressionUpdate.Payload.Value
or other is sent to notify the IDE that a value for given node is available.Trivial implementation of of the
Api.ExpressionUpdate.Payload.Pending
message in the IDE is provided by this PR to (improperly) visualize pending node status - further improvements needed in follow up PRs.Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.