GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — process: add CLI opt to hide experimental warnings by codeman869 · Pull Request #31000 · nodejs/node Conversation
Contributor
Adds a command line option to supress experimental warnings. Currently Fixes: #30810 Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
richardlau
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
cjihrig
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
codeman869
force-pushed
the
feat/no-exp-warnings
branch
from
654fce4 to
5bf1ba3
Compare
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this happens, please don’t use this. This is only for legacy flags that already have corresponding entries on the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, good to know. I'll look into the code more for the correct place to add the flag.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @codeman869 You can look around for
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
jasnell
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just making the -1 explicit.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Qard
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👎 from me. Using experimental features should be discouraged for normal use. Allowing the warnings to be silenced suggests that the warnings against using those features are not important.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
i don't think experimental warnings should be suppressible. when experimental features are enabled, node is running in an unstable state, and that should be made very clear to whoever is running it. (maybe we should whitelist them from --no-warnings) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Allow list SGTM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5bf1ba3 to
7d73b67
Compare
Adds a command line option to supress experimental warnings. Currently this cannot be accomplished without supressing all warnings (by using the --no-warnings option). However, once this option is enabled, a user can miss out on essential warnings as this supresses all warnings. This commit adds the --no-experimental-warnings command line option to allow users to ignore warnings they will expect while still being able to monitor unexpected warnings. Fixes: nodejs#30810
7d73b67 to
0693a79
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this is a good idea 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice idea, LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@devsnek -
looks like the double negative statement (which translates to
One can bring in a counter argument that: on the same ground, There is no disagreement about the importance of the experimental warnings. The question is about its consumability - when message are produced We have evidence of experimental features being used in production ( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Since this seems to be a controversial change, do we want to have TSC evaluate for a final decision to either move forward or close this PR and related issue/feature request? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| AddOption("--no-experimental-warnings", | ||
| "silence all experimental process warnings", | ||
| &EnvironmentOptions::no_experimental_warnings, | ||
| kAllowedInEnvironment); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If this did move forward, it should not be permitted within NODE_OPTIONS
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would be ok with moving forward on this if it were a mechanism to disable specific identified warnings rather than an entire category. Specifically, we have the ability to attach identifiers to warnings that we currently use for deprecations (e.g. the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8ae28ff to
2935f72
Compare
|
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
2 PRs on it, re-opening |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So what exactly is holding this up at the moment? What work needs to be done to close it out? Not sure if I can be of help or not but I'm having to disable all warnings with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think someone needs to put in the work to make this so that the user chooses which experimental warnings to hide. @jasnell @Qard You're the ones with the request-for-changes. Can you confirm or clarify? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
My concern is that many people will just always run with that flag and ignore experimental warnings entirely. Even worse would be if test runners and the like start using it by default, creating an environment with different behaviour from what is typical. Experimental features should not be used in a production app. We're just further enabling people to ignore our judgement about what is and is not ready for production use. If you're worried about log pollution it's because you're using something in prod that you should not be. If a thing is really not actually experimental anymore we should be advocating for marking that thing as stable, not for allowing experimental warnings to be ignored. I feel we need to be very intentional with our messaging around experimental features that they are not safe to use in production and could change or disappear at any time. The presence of experimental features in a release is intended solely for experimentation--we want people to try out an uncertain idea and provide feedback so we can iterate and move it towards stable. When it is actually ready for people to use in prod we will mark it stable. Maybe we need another stage between experimental and stable to indicate something that's no longer in a could-break-at-any-time state but not quite yet at a point where we want to make firm promises about the stability? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I would be good with anything that adds meaningful clarity. For any robust production setup, the messages aren't an issue, IMO. It's easy to ship logs off to a log management system and filter through them as needed. The issue is spamming of the console in development. At the same time, I think that's really beside the point. The code I'm working on right now isn't high stakes and it isn't in production yet. The experimental features are only required for the test environment, anyway. The production code doesn't use anything experimental. I've spent plenty of time digging through the code and related issues for Node and many libs, just to get an experimental environment working and to make sure I understand the limitations and potential problems. That's all to say, I know what I'm doing. As someone that knows what I'm doing, has a use for the experimental feature, is happy to test the experimental feature and provide feedback, and has already knowingly & explicitly enabled the feature, I would like the option to not have my console spammed with messages telling me what I've done. Also, I don't think the console spamming is what's stopping test runners from relying on experimental features. They're already in a position to easily filter out that noise if desired. In reality, it would incur too much risk to support. It would be insane for any remotely popular project which is exactly why it isn't already being done. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I maintain that my preference is for an option to disable individual experimental warnings by code/id as opposed to all warnings, and for that not to be permitted on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I very much agree. That would be ideal. I have no idea how to implement that myself or I would. It sounds a bit more involved than a naive, if less ideal, solution. Would it be worth an initial quick, blunt mechanism before iterating to the more nuanced flags? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Not permitting disabling experimental warnings and not permitting disabling experimental warnings in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Same here, Jest kicks of as many processes as there are test files (as possible.) Therefore the spamming is real. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ditto. Using Landed on this PR after seeing this several 1,000 times and hoping there was a simple way to suppress the warning (because I'm using
💯 agree. I would much prefer not being forced into an all-or-nothing situation on this. FWIW, in the above case I'd expect to fix the issue with something like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
We discussed in the TSC meeting today (note we only had 6 people so a smallish subset). From the discussion there would be no objection from those who were there if there was an option to disabled specific experimental warnings and that was also supported in NODE_OPTIONS. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The warnings should vanish in case the modules contain a The cache is public and that can not change anymore. It has also been publicly documented from very early on. It's existance is documented but not really how to add new entries. This is something that would be benefitial. We could in theory detect properties being added to the cache and ignore those from the circularity check. The implementation of such check would not be trivial though (using proxies with a complicated behavior). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@BridgeAR great thanks for that hint. Interestingly I do not see those warnings anymore, but also a lot of has changed in this code area since my last comment. If I'll see the warnings again, I'll check if your solution helps |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this in favor of #40940, being able to skip individual warnings is going to be less contentious. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Ability to suppress warnings by type (or just experimental warnings)
There was an error while loading. Please reload this page.