Upgrade bazel to 4.0.0rc2
A few things of note here:
- I disabled a few incompatible flags in order to minimize the number
of changes we have to deal with.
- I had to upgrade the typescript rules because the old ones didn't
work with new bazel anymore. That brought a typescript compiler
upgrade along. This in turn required me to turn off strict mode.
Otherwise, there are a _ton_ of errors in our typescript files. The
vast majority of them are related to `null` checking.
- The `default_python_version` attribute on Python rules doesn't exist
anymore. It's now replaced by `python_version`.
- I removed the CROSSTOOL in favour of a Starlark-equivalent
configuration function. See `tools/cpp/toolchain_config.bzl` for
more details. This new file is auto-generated using the migration
tools from `rules_cc`. I have made no attempt to beautify this file.
Relatedly, all CROSSTOOL-related files/functionality are gone as well.
- The `config_setting` targets to detect the compiler names had to
change. This is perhaps not surprising. Thanks to Austin for
pointing this out to me.
- The `cc_toolchain` targets all required `ar_files` and `as_files`
attributes where they didn't before. Not really sure what changed,
but the compilations appears to work with these changes.
Change-Id: I2317e5160fa3f8d87f94106b0c3b328918d0c42c
diff --git a/y2019/vision/server/BUILD b/y2019/vision/server/BUILD
index a7126e4..3d63e09 100644
--- a/y2019/vision/server/BUILD
+++ b/y2019/vision/server/BUILD
@@ -1,7 +1,7 @@
load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")
load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
+load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
ts_library(
diff --git a/y2019/vision/server/www/BUILD b/y2019/vision/server/www/BUILD
index 428dd41..7631d5e 100644
--- a/y2019/vision/server/www/BUILD
+++ b/y2019/vision/server/www/BUILD
@@ -1,4 +1,4 @@
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
+load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
package(default_visibility = ["//visibility:public"])
@@ -32,7 +32,8 @@
rollup_bundle(
name = "visualizer_bundle",
- entry_point = "y2019/vision/server/www/main",
+ enable_code_splitting = False,
+ entry_point = "main.ts",
deps = [
":visualizer",
],