Skip to content

Commit

Permalink
rollup: fail on warnings (#4069)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wchargin committed Aug 21, 2020
1 parent 8dabe5f commit 89fc8d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"karma-sourcemap-loader": "^0.3.7",
"prettier": "1.18.2",
"requirejs": "^2.3.6",
"rollup": "^2.7.1",
"rollup": "^2.26.4",
"sinon": "^7.4.1",
"terser": "^4.6.3",
"tslib": "^1.10.0",
Expand Down
4 changes: 4 additions & 0 deletions tensorboard/defs/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def tf_js_binary(compile, deps, **kwargs):
# Discard it.
rollup_bundle(
config_file = "//tensorboard/defs:rollup_config.js",
# Must pass `true` here specifically, else the input file argument to
# Rollup (added by `rollup_binary`) is interpreted as an option-value
# for `--failAfterWarnings`.
args = ["--failAfterWarnings", "true"],
deps = deps + [
"@npm//@rollup/plugin-commonjs",
"@npm//@rollup/plugin-node-resolve",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5089,10 +5089,10 @@ rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3:
dependencies:
glob "^7.1.3"

rollup@^2.7.1:
version "2.23.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.23.0.tgz#b7ab1fee0c0e60132fd0553c4df1e9cdacfada9d"
integrity sha512-vLNmZFUGVwrnqNAJ/BvuLk1MtWzu4IuoqsH9UWK5AIdO3rt8/CSiJNvPvCIvfzrbNsqKbNzPAG1V2O4eTe2XZg==
rollup@^2.26.4:
version "2.26.4"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.26.4.tgz#a8350fd6bd56fce9873a7db2bd9547d40de3992b"
integrity sha512-6+qsGuP0MXGd7vlYmk72utm1MrgZj5GfXibGL+cRkKQ9+ZL/BnFThDl0D5bcl7AqlzMjAQXRAwZX1HVm22M/4Q==
optionalDependencies:
fsevents "~2.1.2"

Expand Down

0 comments on commit 89fc8d0

Please sign in to comment.