-
Notifications
You must be signed in to change notification settings - Fork 183
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
Updates for Ref properties specified with attributes are always null
in /api/subscribe
responses
#929
Comments
null
in /api/subscribe
responsesnull
in /api/subscribe
responses
I'll be completely honest: I'm not sure what part of the code I need to touch for this. I can do some backtracing to work out what part, but it might be easier to just ask if you know. So, what part of the code would I need to look in for this? Outside the patch application code, I mean. |
The root cause seems to be that ref properties specified via attributes are not included in snapshots of the file system, i.e. when we get here rojo/src/snapshot/patch_compute.rs Lines 120 to 141 in 3ca975d
visited_properties is only populated with properties directly from the snapshot. Ref properties specified via attributes will not exist there, and will be detected as having changed to None in the second loop
why this happens makes sense - it's just that resolving ref properties here will require a slight design change |
To reproduce:
rojo plugin install
rojo serve
on theref_properties
test projectdefault.project.json
(I added a newline)null
for all theRef
properties specified with attributes in ref_properties'default.project.json
:I noticed this behavior in some test failures after #843 was merged: https://github.com/rojo-rbx/rojo/actions/runs/9605402645/job/26492956529#step:7:762. This makes it impossible for the Rojo plugin to live update a Ref property, could cause problems once rbx_dom_lua gains better ability to represent optional values, and can currently cause test failures on macOS due to seemingly inherent noisiness in FSEvents.
One reason this could happen is because deferred Ref property application appears to not influence the returned result of patch application (i.e.
PatchApplyContext.applied_patch_set
), but rather only influences the tree:rojo/src/snapshot/patch_apply.rs
Lines 246 to 299 in 7e2bab9
It will also be worth investigating patch computation, to see if Ref properties specified via attributes are erroneously detected as removed there.
The text was updated successfully, but these errors were encountered: