Skip to content

build: move bazel config to workspace root #13644

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
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
33 changes: 16 additions & 17 deletions tools/bazel.rc → .bazelrc
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
###############################
# Directory structure #
# Filesystem interactions #
###############################

# Don't create bazel-* symlinks in the WORKSPACE directory.
# These require .gitignore and may scare users.
# Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12
# which affects the common case of having `tsconfig.json` in the WORKSPACE directory.
#
# Instead, you should run `bazel info bazel-bin` to find out where the outputs went.
# These require .gitignore and may scare users. Also, it's a workaround for
# https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of
# having `tsconfig.json` in the WORKSPACE directory. Instead, you should run
# `bazel info output_base` to find out where the outputs went.
build --symlink_prefix=/

# Another good choice is to create a dist/ directory. Then you can use
# build --symlink_prefix=dist/
# to get folders like dist/bin
# But be aware, this will still create a bazel-out symlink in your project directory.
# You may still need to exclude that, eg. from the editor's search path.
# Performance: avoid stat'ing input files
build --watchfs

###############################
# Output #
# Output control #
###############################

# A more useful default output mode for bazel query
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
query --output=label_kind

# Don't print every dependency in :node_modules, for example
query --noimplicit_deps

# By default, failing tests don't print any output, it goes to the log file
test --test_output=errors

Expand All @@ -43,9 +36,15 @@ build --workspace_status_command=./tools/bazel-stamp-vars.sh
###############################
# Typescript / Angular / Sass #
###############################
# Make TypeScript and Angular compilation fast, by keeping a few copies of the compiler

# 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 --strategy=AngularTemplateCompile=worker
build --strategy=TypeScriptCompile=worker
build --strategy=AngularTemplateCompile=worker

################################
# Temporary Settings for Ivy #
################################

# Use the legacy AOT compiler strategy. We don't want to compile with Ivy nor with "ngtsc" which
# does not generate factory files which are needed for AOT.
Expand Down