Skip to content

Update/modernize the Bazel build tooling. #474

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

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Conversation

emspishak
Copy link
Contributor

This includes:

  • Adding a .bazelignore so building ... doesn't try to build the node_modules directory.
  • Removing a bazelrc flag that no longer exists and isn't needed anymore.
  • Switching to a modern rollup_bundle implementation. This requires:
    • Adding a config file to set the global name and license banner.
    • Generating output formats separately, since it no longer generates all of them.
    • Using the Rollup Buble plugin to downlevel (transpile) to ES5.
  • Switching npm_package to the modern pkg_npm.
    • This cleans up some "replacements" (formerly called "substitutions")
  • Switching from bazel to bazelisk as bazel is now deprecated for this use case.
  • Upgrading to rules_nodejs version 4.6.0.
  • Switching ts_web_test to the modern karma_web_test (which is in the @bazel/concatjs package).

The JS output is roughly the same. There are some small changes related to variable renaming and optimizations that shouldn't affect runtime behavior. The main difference is that the const DEBUG replacements now work (before the DEBUG const got inlined before the replacement step).

This includes:

- Adding a .bazelignore so building `...` doesn't try to build the node_modules directory.
- Removing a bazelrc flag that no longer exists and isn't needed anymore.
- Switching to a modern rollup_bundle implementation. This requires:
  - Adding a config file to set the global name and license banner.
  - Generating output formats separately, since it no longer generates all of them.
  - Using the Rollup Buble plugin to downlevel (transpile) to ES5.
- Switching npm_package to the modern pkg_npm.
  - This cleans up some "replacements" (formerly called "substitutions")
- Switching from `bazel` to `bazelisk` as `bazel` is now [deprecated](https://www.npmjs.com/package/@bazel/bazel) for this use case.
- Upgrading to rules_nodejs version 4.6.0.
- Switching `ts_web_test` to the modern `karma_web_test` (which is in the `@bazel/concatjs` package).

The JS output is roughly the same. There are some small changes related to variable renaming and optimizations that shouldn't affect runtime behavior. The main difference is that the const `DEBUG` replacements now work (before the `DEBUG` const got inlined before the replacement step).
@emspishak emspishak requested a review from iteriani January 14, 2022 19:06
@iteriani iteriani merged commit 76d11f3 into google:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants