-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: fail on warnings #4069
Merged
Merged
rollup: fail on warnings #4069
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: By default, TypeScript’s downleveling helpers are inlined into each source file, creating functions like `__decorate` and `__assign`. The definition of `__decorate` in particular refers to `this` at top level, which is `window` in non-strict mode and `undefined` in strict mode; this causes a Rollup warning (or 80). This has been reported upstream, but hasn’t yet been addressed: <microsoft/TypeScript#35802> By setting `"importHelpers": true` in the compiler config, we instruct `tsc` to instead import these helpers from `tslib`, avoiding this issue. Test Plan: A spot-check of both statically loaded plugins and the projector plugin doesn’t reveal any issues, and decorators are used for all custom element registration so we know that the wiring is being exercised. Rollup no longer issues this flavor of warning, as listed in #4046. A test sync also indicates no issues, which is expected since these configs and build rules are only used externally. wchargin-branch: tsc-importhelpers wchargin-source: 1ef03e5360b2f59f12824f51490713aa83af81bf
Summary: Rollup complains about circular dependencies and uses of `eval` in our third-party dependencies. In most cases, we’re not able to work around these; sometimes, they’re explicitly wontfix upstream. The warnings aren’t useful, they create spam, and they prevent other, potentially useful warnings from appearing. Test Plan: Building `//tensorboard` no longer prints any warnings, and the built content of `tensorboard/webapp/tb_webapp_binary.js` is identical before and after this change. wchargin-branch: rollup-suppress-3p-warnings wchargin-source: cecac3bd3d10e6e215af5cf6b1228b984bc65edd
Summary: We’ve recently eliminated all Rollup warnings. This prevents regression. Rollup upgrade needed for `--failAfterWarnings`, added recently: <rollup/rollup#3712> Test Plan: Modify the `onwarn` handler in our `rollup_config.js` to remove any of the early-`return`s, and note that `bazel build //tensorboard` fails. wchargin-branch: rollup-no-warn wchargin-source: 8019e8292a51aa9f74cae2d1acc8b0e5ce47cdb2
bileschi
approved these changes
Aug 21, 2020
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.
Thanks!
wchargin-branch: rollup-suppress-3p-warnings wchargin-source: 9d4e8523e7edbcc7ee6de0e39346856423eebfff
wchargin-branch: rollup-no-warn wchargin-source: 28766247bdb44901d87caf1b684bc4243ccaf2d3
Base automatically changed from
wchargin-rollup-suppress-3p-warnings
to
master
August 21, 2020 21:59
wchargin-branch: rollup-no-warn wchargin-source: 787f4e681dfe02c12e692201682bbde8cdc40968
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
We’ve recently eliminated all Rollup warnings. This prevents regression.
Rollup upgrade needed for
--failAfterWarnings
, added recently:rollup/rollup#3712
Test Plan:
Modify the
onwarn
handler in ourrollup_config.js
to remove any ofthe early-
return
s, and note thatbazel build //tensorboard
fails.wchargin-branch: rollup-no-warn