-
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
Encapsulating State access by moving nodes to runtime.state package #12314
Conversation
...tegration-tests/src/test/java/org/enso/interpreter/test/instrument/RuntimeServerTesting.java
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.
Unblocking from libs side.
5c4a006
to
d379995
Compare
...tegration-tests/src/test/java/org/enso/interpreter/test/instrument/RuntimeServerTesting.java
Outdated
Show resolved
Hide resolved
...tegration-tests/src/test/java/org/enso/interpreter/test/instrument/RuntimeServerTesting.java
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.
I see a lot of changes like https://github.com/enso-org/enso/pull/12314/files#diff-ce5f7521078c4c4b93e626e91c74c4fd045073780af555def6cada79203eb58cR692, that is, instead of passing context.emptyState()
, we are passing context.currentState()
. That seems fine. But is it tested anywhere?
engine/runtime/src/main/java/org/enso/interpreter/runtime/state/State.java
Outdated
Show resolved
Hide resolved
@@ -108,7 +109,9 @@ public final class EnsoContext { | |||
private final LockManager lockManager; | |||
private final AtomicLong clock = new AtomicLong(); | |||
|
|||
private final Shape rootStateShape = Shape.newBuilder().layout(State.Container.class).build(); | |||
@CompilationFinal(dimensions = 1) | |||
private Object[] extraValues = new Object[0]; |
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.
Apart for rootStateShape
, isn't there anything else that we can move into this extraValues
?
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.
LockManager
, NotificationHandler
, DistributionManager
, ResourceManager
, etc. - all of this stuff can be moved out of EnsoContext
now with the help of extraValues
. E.g. the EnsoManager
doesn't need to be a hub that references everything during javac
compilation. All these extra services can be loosely connected to it with the help of this concept.
Thanks for noticing and I encourage everyone to use this extra values concept in subsequent PRs!
...tegration-tests/src/test/java/org/enso/interpreter/test/instrument/RuntimeServerTesting.java
Outdated
Show resolved
Hide resolved
#12326 is soon to be merged. So I am replacing |
Co-authored-by: Pavel Marek <[email protected]>
We don't have
This is the first and only test related to that I know about. I guess we add more if something gets broken. |
Pull Request Description
Refactoring to fix #12294.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,