Skip to content

build: use bazel automatic execution strategy selection #16823

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ test --test_output=errors
# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command
build:release --workspace_status_command="node ./tools/bazel-stamp-vars.js"

###############################
# Typescript / Angular / Sass #
###############################

# Make compilation fast, by keeping a few copies of the compilers
# running as daemons, and cache SourceFile AST's to reduce parse time.
build --strategy=TypeScriptCompile=worker
build --strategy=AngularTemplateCompile=worker
build --strategy=SassCompiler=worker

################################
# Temporary Settings for Ivy #
################################
Expand All @@ -62,12 +52,7 @@ build --define=compile=legacy
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
build:remote --project_id=internal-200822

# Setup the build strategy for various types of actions. Mixing "local" and "remote"
# can cause unexpected results and we want to run everything remotely if possible.
build:remote --spawn_strategy=remote,local
build:remote --strategy=Javac=remote
build:remote --strategy=Closure=remote
build:remote --strategy=Genrule=remote
# Needed due to: https://github.com/bazelbuild/bazel/issues/7254
build:remote --define=EXECUTOR=remote

# Setup the remote build execution servers.
Expand Down
7 changes: 7 additions & 0 deletions src/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@npm_bazel_typescript//:index.bzl", "ts_config")
load("//:packages.bzl", "CDK_PACKAGES", "MATERIAL_PACKAGES")
load("//tools:defaults.bzl", "ts_library")
load("//tools/dgeni:index.bzl", "dgeni_api_docs")
Expand All @@ -21,6 +22,12 @@ ts_library(
srcs = [":module-typings.d.ts"],
)

ts_config(
name = "tsconfig-test",
src = "bazel-tsconfig-test.json",
deps = ["bazel-tsconfig-build.json"],
)

dgeni_api_docs(
name = "api-docs",
srcs = apiSourceFiles + [
Expand Down
2 changes: 1 addition & 1 deletion tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load("//tools/markdown-to-html:index.bzl", _markdown_to_html = "markdown_to_html
load("//:packages.bzl", "ANGULAR_LIBRARY_UMDS", "VERSION_PLACEHOLDER_REPLACEMENTS")

_DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json"
_DEFAULT_TSCONFIG_TEST = "//src:bazel-tsconfig-test.json"
_DEFAULT_TSCONFIG_TEST = "//src:tsconfig-test"

# Whether Angular type checking should be enabled or not. Enabled by
# default but will be overwritten when running snapshots tests with Ivy
Expand Down