| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
btw, this change is somewhat unrelated ;)
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, I thought for a second I could add it here, but it's not the right place.
Reverted the comma.
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think we should make it a habit of adding miscellaneous globals from IDEs.
Sorry, something went wrong.
|
I don't understand the need for this for running the test suite. To me, this seems like something JetBrains should fix, not us. |
Sorry, something went wrong.
I added a reference to the Issue I opened for JetBrains, meanwhile it's a nuisance for devs who want to debug the tests with a JetBrains tool. |
Sorry, something went wrong.
There was a problem hiding this comment.
Making it explicit
Sorry, something went wrong.
There was a problem hiding this comment.
I think it is a reasonable exception in order to make a dev's life easier and we shouldn't be purist about it -it's helpful and there is no harm.
Sorry, something went wrong.
There was a problem hiding this comment.
Given how unlikely it is to have a legitimate _jb_debug_helper global leaking from our code, I'd say LGTM.
Sorry, something went wrong.
|
I'm with Brian and Colin: if your tool of choice is broken, fix it or use a better one, don't add hacks. |
Sorry, something went wrong.
|
I don't think we can guarantee inspectors won't inject things. Perhaps we could have a way to force code tampering off? |
Sorry, something went wrong.
|
@Fishrock123 If you do that, then you won't know when non-IDE globals start leaking... |
Sorry, something went wrong.
|
It is my understanding that the global leak checks do not use the inspector, (or at the very least they pre-date the inspector)? |
Sorry, something went wrong.
|
Another possible alternative solution to just saying no would be to introduce an environment variable that test/common pays attention to, allowing globals like this to be set. There would be zero impact on the default case and CI would not be impacted. |
Sorry, something went wrong.
|
I won't strenuously object but that's still adding complexity to work around a broken tool. |
Sorry, something went wrong.
|
What is the conclusion here? We have a couple of persons pro and a couple of persons against it. I personally have no strong opinion about this but I am somewhat with @cjihrig etc that this should be fixed in JetBrains and not in Node. |
Sorry, something went wrong.
|
Even though I'm in favor of this PR, I think it should be closed given the number of 👎's this is getting. My two cents. |
Sorry, something went wrong.
Yeah, if I'm not mistaken, there's only two ways this could land:
|
Sorry, something went wrong.
|
IMHO It's not worth escalating. |
Sorry, something went wrong.
|
@mscdex and other objectors PTAL if (process.env.NODE_TEST_KNOWN_GLOBALS) {
const knownFromEnv = process.env.NODE_TEST_KNOWN_GLOBALS.split(',');
allowGlobals(...knownFromEnv);
} |
Sorry, something went wrong.
|
Still LGTM, but now Node.js is not aware of hard coded debugger values - so that's nice. |
Sorry, something went wrong.
There was a problem hiding this comment.
This seems more reasonable to me.
Sorry, something went wrong.
There was a problem hiding this comment.
This is much cleaner 👍
Sorry, something went wrong.
|
@mscdex are you still against this with the current change? |
Sorry, something went wrong.
|
It still shouldn't be necessary though... |
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: nodejs#15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: nodejs/node#15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: nodejs/node#15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
| Back | FazBrowse Home | New Git URL |
update
In order to provide a smoother test dev experience, with less false positives, we should allow specifying more known global symbols. This implementation uses an ENV var for said specification.
Example
end update
When debugging /test/ using JetBrains' debugger sometimes it leaked a global symbol _jb_debug_helper:
A bug report was opened upstream for said IDE
Refs: https://youtrack.jetbrains.com/issue/WEB-27528
Checklist
Affected core subsystem(s)
test