-
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
Cannot access "non-node" arguments in drop down widgets evaluation #9941
Comments
Jaroslav Tulach reports a new STANDUP for yesterday (2024-05-21): Progress: - playing with `Widget: #9941
|
I've created a small project to play with the drop down arguments. Download as AccessArgumentsDropDown.zip and from Standard.Base import all
from Standard.Base.Metadata import all
import Standard.Visualization
type T
@b for_b
as_list a b = [a, b]
for_b s cache=Nothing =
me = [ "self", s ]
a = ["a", cache "a"]
b = ["b", cache "b"]
make [1, "dva", me, a, b]
make values:Vector =
make_option value = Choice.Option value.to_text value.pretty
dbg values.to_text
Widget.Single_Choice (values.map make_option) Nothing Display.Always
main =
integer1 = 11
node1 = T.as_list 436 1
[node1, _]
foreign js dbg info = """
debugger; The first thing to notice is that evaluation of the |
@jdunkerley, @marthasharkey - if you want to experiment with accessing arguments like diff --git engine/runtime-instrument-common/src/main/java/org/enso/interpreter/instrument/RuntimeCache.java engine/runtime-instrument-common/src/main/java/org/enso/interpreter/instrument/RuntimeCache.java
index da2f8e2447..985a02d943 100644
--- engine/runtime-instrument-common/src/main/java/org/enso/interpreter/instrument/RuntimeCache.java
+++ engine/runtime-instrument-common/src/main/java/org/enso/interpreter/instrument/RuntimeCache.java
@@ -38,14 +38,8 @@ public final class RuntimeCache implements java.util.function.Function<String, O
valuesToKeys.put(value, key);
return true;
} else {
- var otherId = valuesToKeys.get(value);
- var otherValue = cache.get(otherId);
- if (otherValue != null && otherValue.get() == value) {
- // if the value is already cached for another UUID, cache it
- // for this expression UUID as well
- var ref = new WeakReference<>(value);
- expressions.put(key, ref);
- }
+ var ref = new WeakReference<>(value);
+ expressions.put(key, ref);
return false;
}
} it does seem to work to some extend (values may be outdated, or missing from time to time). It should be good enough for testing. |
By |
Jaroslav Tulach reports a new STANDUP for yesterday (2024-05-22): Progress: - small
|
Yes.
You are right the |
Jaroslav Tulach reports a new STANDUP for yesterday (2024-05-23): Progress: - ms in log merged : #10016
|
Jaroslav Tulach reports a new STANDUP for the last Friday (2024-05-24): Progress: - reactive
|
Jaroslav Tulach reports a new STANDUP for yesterday (2024-05-27): Progress: - Reactive Cache is in: #10065
|
There has to be a balance between amount of cached values and optimal memory usage. As such the PR
added following reasoning and provides access only to argument values already assigned to some other node. @jdunkerley points out that's not enough:
Workaround:
The text was updated successfully, but these errors were encountered: