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 beta] Make assertions from on and fn more actionable. #18871

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 13, 2020

Prior to these changes, the assertions for fn and on were very inactionable. This leverages the debug render tree information to print the template contexts (route hierarchy, component invocation heirarchy, etc) along with the path name used for the callback argument.

This is essentially a rewrite of the work started by @patricklx in #18353 (since that PR had to be reverted due to changes in glimmer-vm internals since it was proposed).

@rwjblue rwjblue added the Bug label Apr 13, 2020
@rwjblue rwjblue requested a review from pzuraq April 13, 2020 16:02
@patricklx
Copy link
Contributor

nice to finally see this :)
but i wonder if there isn't a more generic approach to apply logRenderStackForPath to all errors generated during template render/update and include all passed params in the error as well. for all modifiers/helpers etc...

Prior to these changes, the assertions for `fn` and `on` were very
inactionable. This leverages the debug render tree information to print
the template contexts (route hierarchy, component invocation heirarchy,
etc) along with the path name used for the callback argument.
@rwjblue rwjblue force-pushed the better-fn-and-on-assertions branch from cf8fa48 to a7368d2 Compare April 14, 2020 18:44
@rwjblue rwjblue merged commit a493c6a into master Apr 14, 2020
@rwjblue rwjblue deleted the better-fn-and-on-assertions branch April 14, 2020 20:16
@rwjblue
Copy link
Member Author

rwjblue commented Apr 14, 2020

I wonder if there isn't a more generic approach to apply logRenderStackForPath to all errors generated during template render/update and include all passed params in the error as well. for all modifiers/helpers etc...

Ya, I totally agree. I'll think on it, not sure exactly where that fits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants