Skip to content
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

TDBProxy limitation: Retracing of side effects will not continue after return #62

Open
LinqLover opened this issue Mar 14, 2022 · 0 comments
Labels
engineering Technical change to the machinery

Comments

@LinqLover
Copy link
Collaborator

Example:

array := Array streamContents: [:s|
	aTdbProxyForAnArray do: [:ea | s nextPut: ea]].
array first someState.

One might expect that the element arrays would be further TDBProxys after executing this snippet, or that the entire handling of the array would be continued in the retracing simulator. However, none of this is currently the case and the final expression accesses the current version of the item's state instead of its historic state.
Hypothetically related if we wanted to go the second route: LinqLover/SimulationStudio#51

At the moment, a workaround is to wrap the entire expression with a message send to the proxy, e.g.:

aTdbProxyForAnArray in: [:theTdbProxyForAnArray |
	array := Array streamContents: [:s|
		theTdbProxyForAnArray do: [:ea | s nextPut: ea]].
	array first someState].

Maybe we should at least document this pattern somewhere.

See TDBObjectExplorerWrapper>>#contents for a real motivating example.

@LinqLover LinqLover added the engineering Technical change to the machinery label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Technical change to the machinery
Projects
None yet
Development

No branches or pull requests

1 participant