Add .suppressWarnings()
for warnings in #1915 #1931 #1938 #1940
#1955
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Peer PRs
Requires changes when merged with…
chainArgParserCalls()
for configuration. Additionally await thenable implicit and default option values and thenable default argument values #1915.command()
#1938.parse()
#1940👉 ❗ 💬 This PR is the place for discussions about the warning model that apply to all of the PRs listed above!
Incompatible with…
.suppressWarnings()
introduced here become incorrect. The fact there is currently no well-defined meaning for such calls is one of the reasons why #1938 and #1940 should be preferred over #1917!Changes summary
Proposed mistake handling model
Based on #1940 (comment). Could be added to the docs.
suppressWarnings
is on – a setting added specifically so that warnings can be hidden from end usersthrow
the error for the author to handle – should not be seen by end userChangeLog
Added
.suppressWarnings()
to suppress warnings about presumably wrong library usageSome explanations
Why
.suppressWarning()
instead of an environment variable such asNODE_ENV
(as originally proposed)?Environment variables are used for stuff the end user should be able to control, but in our case, the tool author is the one to decide whether the warnings are to be shown.
See also: #1940 (comment).