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

Fix resource dictionary destruction and insertion with deferred values #130

Merged

Conversation

turbolent
Copy link
Member

Related to #128

When a resource dictionary is destroyed or a key is updated, the value might be deferred.

Load the deferred values properly instead of only considering loaded values.

Also, simplify/reuse the existing test for ensuring deferred values are properly loaded when removing keys from resource dictionaries.

The diff looks odd, might be best reviewed by looking at the new code in split-diff mode

Copy link
Member

@Kay-Zee Kay-Zee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests!


var returnValue Value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is no longer needed? just making sure we didn't remove it by accident.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was boxing the result from Insert, which used to return a Value or nil, but is now already returning an OptionalValue, so it doesn't need to be boxed up here anymore

Copy link
Contributor

@psiemens psiemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@turbolent turbolent merged commit 5ca09a6 into master May 24, 2020
@turbolent turbolent deleted the bastian/fix-resource-dictionary-value-deferral-destruction branch May 24, 2020 00:52
SupunS added a commit that referenced this pull request Jul 11, 2023
[v0.39] Remove spurious resource loss errors (internal #130)
SupunS added a commit that referenced this pull request Jul 12, 2023
Remove spurious resource loss errors (internal #130)
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.

3 participants