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
rollup_bundle: stop --silent rollup to let it report all build errors #459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @alexeagle any final comments before we merge? // cc @gregmagolan
# | ||
# TODO(https://github.com/rollup/rollup/issues/2582): Uncomment the following | ||
# line once rollup stops reporting build errors with onwarn. | ||
# args.add("--silent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my concern is what does an execution of bazel look like now? Does rollup print a bunch of stuff to the terminal? as said in the original comment, a well-behaved bazel rule prints nothing on success. Can we somehow throw away the stdout from rollup if the compilation is successful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally understand. However, in this case I'd prioritize the correctness over the noise made by rollup. OTOH, this is actually inevitable in the nodejs world, even if the rollup is silenced, some poorly written plugin may console.log something from nowhere . So I think we can replace this comment with a more descriptive message pointing to a bug in rules_nodejs saying we should fix the log spam in the future. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we can write a wrapper tool to filter the messages -- but does it worth the effort? As rollup is almost certainly the last step in a release cycle. So it won't be run that frequently and the spam it made should not be that bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to start spamming the console with rollup success messages
PTAL @alexeagle |
Now we can use |
Not planning to add features to old rollup-bundle rule, will be deleted by 1.0 you were right though, |
This CL removes
--silent
flag when runningrollup
to let it report all the warnings and errors (due to rollup/rollup#2582) during the build. The warning message now contains location info when available.As a result of this change, some config errors are found and fixed as well:
config.output.banner
instead ofconfig.banner
as the latter is deprecated in rollup/rollup@ffe4e5b.config.experimentalDynamicImport
as rollup/rollup@4d4ec4c made it default and removed it.resolveBazel
inconfig
to avoid triggering unknown config error, and let the test to find it in plug-in list by name.Updates #447