-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Node 0.12 stable fails on strict mode #9187
Comments
If you need to load the May I ask why you need to pass Adding this issue to the 0.12.1 milestone. |
@misterdjules Just because it's more convenient than inserting |
See also #7479. |
Maybe I don't fully comprehend what the If V8's |
No, If you want to get warnings about "sloppy" code, you can use linters like |
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. This change adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled, and fixes the built-in modules that are currently broken. Fixes nodejs#9187.
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. This change adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled, and fixes the built-in modules that are currently broken. Fixes nodejs#9187.
@Tresdin Thanks for the information. Like several others pointed out already here and in #7479 , passing Nevertheless, it seems that we can't really deprecate Actually, if we decide to go down that path, I'm wondering if we should also add What do you think? |
Excellent.
@Tresdin this sounds like a great idea, otherwise variations of bugs like this will appear wherever a built-in module isn't compliant. |
@misterdjules your PR can't be merged. What if we included |
@cjihrig What do you mean by "can't be merged"? Yes, adding |
Sorry, I just meant that there are merge conflicts. |
@cjihrig It applies cleanly with
Am I missing something? |
@misterdjules I meant the grey "We can’t automatically merge this pull request." on #9237. Is it showing up green for you? |
@cjihrig Thank you, and sorry for not realizing that earlier :) I usually do not check the "merge section" in any PR because we don't use the merge button. I don't know why GitHub says it cannot be merged, I'll investigate further. |
@misterdjules I think |
Sure. If we add a way to opt-out of it for each individual module (i.e. |
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. This change adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled, and fixes the built-in modules that are currently broken. Fixes nodejs#9187.
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. In addition to that, console.trace throws because it uses arguments.callee. This change fixes these issues and adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled. Please note that this change does not fix all issues with built-in modules' code running with --use-strict. It is very likely that some code in the built-in modules still fails when passing this flag. However, fixing all code would require us to enable strict mode by default in all builtins modules, which would certainly break existing applications. Fixes nodejs#9187.
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. In addition to that, console.trace throws because it uses arguments.callee. This change fixes these issues and adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled. Please note that this change does not fix all issues with built-in modules' code running with --use-strict. It is very likely that some code in the built-in modules still fails when passing this flag. However, fixing all code would require us to enable strict mode by default in all builtins modules, which would certainly break existing applications. Fixes nodejs#9187.
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. In addition to that, console.trace throws because it uses arguments.callee. This change fixes these issues and adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled. Please note that this change does not fix all issues with built-in modules' code running with --use-strict. It is very likely that some code in the built-in modules still fails when passing this flag. However, fixing all code would require us to enable strict mode by default in all builtins modules, which would certainly break existing applications. Fixes nodejs#9187. PR: nodejs#9237 PR-URL: nodejs#9237 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when --use-strict is passed to node. In addition to that, console.trace throws because it uses arguments.callee. This change fixes these issues and adds a test that makes sure every external built-in module can be loaded with require when --use-strict is enabled. Please note that this change does not fix all issues with built-in modules' code running with --use-strict. It is very likely that some code in the built-in modules still fails when passing this flag. However, fixing all code would require us to enable strict mode by default in all builtins modules, which would certainly break existing applications. Fixes #9187. PR: #9237 PR-URL: #9237 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Fixed in b233131, thank you! |
Also, a follow-up commit that enables strict mode in all built-in modules has landed in master with ef43443. |
I found this error when I run node with
node --use_strict myapp.js
. What can I do in this case?The text was updated successfully, but these errors were encountered: