From 9a965c9145ece752c0d81872e9dbaea51ed0c108 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 20 Dec 2018 12:12:51 -0800 Subject: [PATCH] build: create dist/bin symlink with Bazel outputs (#27781) Note that we had nasty problems in the past when this was enabled, but those have supposedly been fixed. PR Close #27781 --- .bazelrc | 12 +++++++++--- .gitignore | 3 +-- .vscode/settings.json | 15 +++++++++++++++ integration/bazel/.bazelrc | 3 +++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.bazelrc b/.bazelrc index 9f8d57c87d895..73e03be2cbf7a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -22,12 +22,18 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test # Filesystem interactions # ############################### -# Don't create symlinks like bazel-out in the project. -# These cause VSCode to traverse a massive tree, opening file handles and +# Create symlinks in the project: +# - dist/bin for outputs +# - dist/testlogs, dist/genfiles +# - bazel-out +# NB: bazel-out should be excluded from the editor configuration. +# The checked-in /.vscode/settings.json does this for VSCode. +# Other editors may require manual config to ignore this directory. +# In the past, we say a problem where VSCode traversed a massive tree, opening file handles and # eventually a surprising failure with auto-discovery of the C++ toolchain in # MacOS High Sierra. # See https://github.com/bazelbuild/bazel/issues/4603 -build --symlink_prefix=/ +build --symlink_prefix=dist/ # Performance: avoid stat'ing input files build --watchfs diff --git a/.gitignore b/.gitignore index 038b7056382b8..d31384a20ed4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_STORE /dist/ -/bazel-* +/bazel-out/ /integration/bazel/bazel-* e2e_test.* node_modules @@ -15,7 +15,6 @@ pubspec.lock .settings/ *.swo modules/.settings -.vscode modules/.vscode # Don't check in secret files diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000..3fd1d447d002a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/node_modules/**": true, + "**/bazel-out/**": true, + "**/dist/**": true, + }, + "search.exclude": { + "**/node_modules": true, + "**/bower_components": true, + "**/bazel-out": true, + "**/dist": true, + }, +} \ No newline at end of file diff --git a/integration/bazel/.bazelrc b/integration/bazel/.bazelrc index a139814adcb5e..1a9ab9f69f3cb 100644 --- a/integration/bazel/.bazelrc +++ b/integration/bazel/.bazelrc @@ -13,3 +13,6 @@ build --local_resources=14336,8.0,1.0 # Use the Angular 6 compiler build --define=compile=legacy + +# Don't create symlinks +build --symlink_prefix=/