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
Errors thrown inside onwarn
are ignored with --silent
#2686
Comments
If you provide an "onwarn" handler that does nothing, then this is equivalent to using the "--silent" option. Therefore Rollup assumes that when you pass both the "onwarn" handler and the "--silent" option, then your intention is to no longer forward warnings to the "onwarn" handler. So you are suggesting that "--silent" should become an ignored flag when an "onwarn" handler is passed? I am not sure that this is an improvement. In the current situation, you could have a strict "onwarn" handler that turns some warnings into errors but still disable it temporarily via CLI flag to debug issues. |
Maybe this is more a documentation issue? Improvements are always welcome! |
My particular usecase is the same as #2582, which we identified causing problems in bazelbuild/rules_nodejs#459. In our setup we'd like to not have any logging at all, and instead error out on anything that should show a warning. Just using the Is there any way to not have the Rollup CLI logging while keeping usage of |
I cannot confirm this and this should not be the case. In my own test code, an empty |
Given the files below:
Running the rollup CLI over it will print the following:
Rollup will always print the three lines below when not using
|
To be clear, those 3 lines are not errors. They are just logging that can only be removed with |
Ah I see, that was the misunderstanding. So the issue is the double meaning of |
Fix at #2981 |
How Do We Reproduce?
This example is related to @lukastaegert suggestion in #2582 (comment):
Create the following files and install rollup using npm/yarn:
Expected Behavior
Running
rollup -c rollup.config.js
will throwError: Unknown input option
.But
rollup -c rollup.config.js --silent
will complete successfully.Actual Behavior
Error to be thrown with and without the
--silent
flag.The text was updated successfully, but these errors were encountered: