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

[BUGFIX release] Ensures the arg proxy works with get #18708

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Jan 29, 2020

Previously, the arg proxy used a custom system for passing along its
capturedArgs directly to getChainTags, in order to interoperate with
computed properties. As it turns out, there are a number of other places
where the correct tag needs to be gotten and setup.

This PR replaces the UNKNOWN_PROPERTY_TAG system with a more general
CUSTOM_TAG_FOR system. In this system, if we detect that an object has
this method, we defer to it to get the tag, even if the property was
defined on the object. There are two users of this system:

  • ProxyMixin
  • The arg proxy

Given that it's private, and we have relatively few use cases, I believe
this is the cleanest solution at the moment. The alternative would be to
keep UNKNOWN_PROPERTY_TAG and also add CUSTOM_TAG_FOR, but that
seems unnecessary given low usage.

Fixes #18606

Previously, the arg proxy used a custom system for passing along its
`capturedArgs` directly to `getChainTags`, in order to interoperate with
computed properties. As it turns out, there are a number of other places
where the correct tag needs to be gotten and setup.

This PR replaces the `UNKNOWN_PROPERTY_TAG` system with a more general
`CUSTOM_TAG_FOR` system. In this system, if we detect that an object has
this method, we defer to it to get the tag, even if the property was
defined on the object. There are two users of this system:

- ProxyMixin
- The arg proxy

Given that it's private, and we have relatively few use cases, I believe
this is the cleanest solution at the moment. The alternative would be to
keep `UNKNOWN_PROPERTY_TAG` and also add `CUSTOM_TAG_FOR`, but that
seems unnecessary given low usage.
@pzuraq pzuraq force-pushed the bugfix/ensure-args-proxy-works-with-get branch from fe4c13d to 6e8eb68 Compare January 29, 2020 03:46
@rwjblue rwjblue merged commit a3ee32e into master Jan 30, 2020
@rwjblue rwjblue deleted the bugfix/ensure-args-proxy-works-with-get branch January 30, 2020 19:20
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.

Using get helper with this.args results in an error
2 participants