Skip to content

test: Add test for #301#302

Open
alt-romes wants to merge 1 commit into
masterfrom
wip/romes/debug-view-bug
Open

test: Add test for #301#302
alt-romes wants to merge 1 commit into
masterfrom
wip/romes/debug-view-bug

Conversation

@alt-romes
Copy link
Copy Markdown
Collaborator

@alt-romes alt-romes commented Apr 29, 2026

If we use an arbitrary computation as the value for a DebugView field,
which is re-created from scratch everytime we recompute that DebugView
fields, then evaluating that thunk is not persisted across refreshing
the variable.

Every time we re-fresh the variable we re-create the thunk, so it makes
some sense that forcing it is not persisted across re-freshing, but
still a bit unsatisfactory (esp. since the variables are invalidated as
soon as a variable is forced, so we only see a flash of these values)

See #301

@alt-romes alt-romes force-pushed the wip/romes/debug-view-bug branch from 487dd18 to edd6a24 Compare April 29, 2026 15:10
If we use an arbitrary computation as the value for a DebugView field,
which is re-created from scratch everytime we recompute that DebugView
fields, then evaluating that thunk is not persisted across refreshing
the variable.

Every time we re-fresh the variable we re-create the thunk, so it makes
some sense that forcing it is not persisted across re-freshing, but
still a bit unsatisfactory (esp. since the variables are invalidated as
soon as a variable is forced, so we only see a flash of these values)

Marked as expect fail.

Tracked by #301
@alt-romes alt-romes force-pushed the wip/romes/debug-view-bug branch from edd6a24 to f5b5598 Compare April 29, 2026 15:36
@alt-romes
Copy link
Copy Markdown
Collaborator Author

Maybe this shouldn't be considered unexpected behavior.

Would the user ever want these fields to be lazy? I guess if we don't want to do the work straight away but still have the option to display on force would be useful.

However, that means we'd need a way of persisting the value across invocations. Potentially by extending Program to allow explicitly allocating a re-usable value at a given key.

See #301 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant