-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
assert: improve loose assertion message #22155
Conversation
So far the error message from a loose assertion is not always very informative and could be misleading. This is fixed by: * showing more from the actual error message * having a better error description * not using custom inspection * inspecting a higher depth * inspecting the full array instead of up to 100 entries
Code LGTM. But isn't Is this something we need? |
@mcollina it is doc deprecated but the problem is that it is still used relatively often. It is also not likely or currently intended to change the doc deprecation to a runtime deprecation. This is mainly a hot fix for some of the issues that the old version has for the case that people still use that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
So far the error message from a loose assertion is not always very informative and could be misleading. This is fixed by: * showing more from the actual error message * having a better error description * not using custom inspection * inspecting a higher depth * inspecting the full array instead of up to 100 entries PR-URL: nodejs#22155 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Landed in 1d859ef |
@BridgeAR if this isn't semver-major (is it?) would you mind backporting to v10.x-staging please? There's a bit too much churn in there for this to apply nicely. |
Ping @BridgeAR |
1 similar comment
Ping @BridgeAR |
Ping |
So far the error message from a loose assertion is not always very informative and could be misleading. This is fixed by: * showing more from the actual error message * having a better error description * not using custom inspection * inspecting a higher depth * inspecting the full array instead of up to 100 entries PR-URL: nodejs#22155 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
This relies on a semver-major change and should not be backported. |
So far the error message from a loose assertion is not always very
informative and could be misleading. This is fixed by:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes