-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Error message possible typo in node_zlib #16987
Comments
The quotes shouldn’t be there but I’d guess it’s hard to get rid of them because of how assertions are implemented in Node’s C++ layer… |
I am no expert regarding C++. A colleague of mine actually suggested that a possible workaround would be to add a backspace at the end of line 436 in file
I know that this workaround is actually horrible (stylistically speaking, at least)... But may it be a partial workaround for the problem? |
@amarchino Please feel free to open a PR with your suggestion and/or try that out if you want :) |
@amarchino do you have an update on this? |
Sorry for the enormous delay. |
The ZCtx::Init function presents a standard CHECK to handle the argument number. The correct number of arguments as of now is 7. The CHECK usage follows the standard usage in the node C++ code, yet this is the only instance where the error message is long enough so as to be split in two lines. The macro CHECK displays this error message incorrectly. The fix revolves around a copy of the macro, injected in the point of code where the previous CHECK was residing; it formats the message in the same way the macro would have and cleanly exits the execution. Fixes: nodejs#16987
I'm going to close this out given that the related PR was closed as non-actionable. |
After upgrading to Node v9.1.0 (and reading the changelog. Always read the changelog) I found a possible typo in the error message introduced in #16657 .
After issuing a refresh of the dependencies (to ensure that the native modules of my project keep working), I found the message
src\node_zlib.cc:437: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
The error is actually correct (one of the dependencies has a transitive dependency on an older version of node-tar, triggering the warning and the subsequent error), but it seems to me that the error message is wrong.
Should there be a comma between the quotes and the word dictionary? Or are the quotes erroneous?
Thanks for the attention.
The text was updated successfully, but these errors were encountered: