Alterations to object by label observers#37
Alterations to object by label observers#37kriskowal wants to merge 1 commit intomontagejs:masterfrom
Conversation
1. Removes support for annotating the syntax tree with the last known object to be observed for a label on that node. This is necessary for syntax tree memoization. This also breaks a few Montage test cases that may or may not be important: `serialization-spec` localizations unit serializer serializes default message binding, and serializes data binding, as well as `bindings-spec` should serialize a binding that references external objects. 2. Adds support for `observeObjectByLabel` that has been useful in experiments where the object in scope may change in response to panel changes in a substitution. 3. Removes the alias `getComponentByLabel` because, in the context of Montage serialization, labels may be applied to any value.
There was a problem hiding this comment.
Just being curious, where were we using this information?
There was a problem hiding this comment.
stringify is/was rigged to use components.getLabelForObject or components.getObjectLabel on syntax.component to consult a deserializer to rewrite the label based on which serialization it was being used in. This, if you recall, was necessary for making round trips through the serialization system.
There was a problem hiding this comment.
@aadsm We should figure out whether we’re still using this feature.
|
I will punt this issue to the v2 branch and merge myself. I’ll make a note in the change log to make it less mysterious why things break if we’re still depending on syntax annotation at run-time in MontageJS. |
object to be observed for a label on that node. This is necessary for
syntax tree memoization. This also breaks a few Montage test cases that
may or may not be important:
serialization-speclocalizations unitserializer serializes default message binding, and serializes data
binding, as well as
bindings-specshould serialize a binding thatreferences external objects.
observeObjectByLabelthat has been useful inexperiments where the object in scope may change in response to panel
changes in a substitution.
getComponentByLabelbecause, in the context ofMontage serialization, labels may be applied to any value.