-
Notifications
You must be signed in to change notification settings - Fork 326
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
Avoid whole source reparsing when the IDE performs a simple edit #3508
Avoid whole source reparsing when the IDE performs a simple edit #3508
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.
Quite elegant, though we definitely should update the IR as well. Also a few remarks inline
...e/runtime/src/main/java/org/enso/interpreter/node/expression/literal/IntegerLiteralNode.java
Outdated
Show resolved
Hide resolved
...e/runtime/src/main/java/org/enso/interpreter/node/expression/literal/IntegerLiteralNode.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java
Outdated
Show resolved
Hide resolved
ff44a4d
to
1164679
Compare
…entalUpdates-182323784
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.
Logically this seems right, some comments left inline.
engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/ModuleScope.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/PatchedModuleValues.java
Outdated
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.
Nicely done! Please clean things up a bit before we merge it
...rument-id-execution/src/main/java/org/enso/interpreter/instrument/IdExecutionInstrument.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/instrument/IdExecutionService.java
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/node/ClosureRootNode.java
Show resolved
Hide resolved
...ne/runtime/src/main/java/org/enso/interpreter/node/callable/function/CreateFunctionNode.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Dmitry Bushev <[email protected]>
Co-authored-by: Dmitry Bushev <[email protected]>
Commit 6c81820 addressed the latest comments. I am not sure what to do about #3508 (comment) - as there already is Adding "CI: Ready to merge" label. Awaiting approval. |
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.
A few more comments by me, but overall looks good now!
...rument-id-execution/src/main/java/org/enso/interpreter/instrument/IdExecutionInstrument.java
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/PatchedModuleValues.java
Show resolved
Hide resolved
574625c
to
52630ed
Compare
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 think we let you suffer enough of Scala, just make sure numericValue
returns Either and it lgtm
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/context/ChangesetBuilder.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Hubert Plociniczak <[email protected]>
Co-authored-by: Hubert Plociniczak <[email protected]>
Co-authored-by: Hubert Plociniczak <[email protected]>
Co-authored-by: Hubert Plociniczak <[email protected]>
Co-authored-by: Dmitry Bushev <[email protected]> Co-authored-by: Hubert Plociniczak <[email protected]>
Pull Request Description
The goal of this PR is to demonstrate we can avoid parsing of the whole program when the IDE makes simple edit. The PR contains new
[IncrementalUpdatesTest](https://github.com/enso-org/enso/compare/wip/jtulach/IncrementalUpdates-182323784?expand=1#diff-225738cc33a66aea979256736e4467473c6d5a4e0b16efe821caac3c1f4730c1)
which (viaNodeCountingTestInstrument
) checks whether a new node is created or not. Right now the test fails with an error 28 nodes created instead of none when replacing4
with5
:The 8bd50ab commit fixes the test by finding the right
IntegerLiteralNode
in the Truffle AST and updating it.Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.