Skip to content

Commit 9ace7d7

Browse files
josephperrottalxhub
authored andcommitted
build: add the ignore all rc files flag when running bazel info
Due to a bug in bazel we need to ignore all of the rc files when running bazel info commands
1 parent 827f5a6 commit 9ace7d7

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

packages/language-service/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ set -ex
55
# so that it can be consumed by the Angular extension for local development.
66
# Usage: ./build.sh /path/to/vscode-ng-language-service
77

8-
readonly bazel_bin=$(pnpm --silent bazel info bazel-bin)
8+
# TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
9+
# commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
10+
readonly bazel_bin=$(pnpm --silent bazel --ignore_all_rc_files info bazel-bin)
911
readonly extension_repo="$1"
1012

1113
if [[ -z "${extension_repo}" ]]; then

scripts/build/angular-in-memory-web-api.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export function buildAngularInMemoryWebApiPackage(destDir: string): void {
3131
// Ensure the output directory is available.
3232
exec(`mkdir -p ${destDir}`);
3333

34-
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
34+
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
35+
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
36+
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
3537

3638
// Copy artifacts to `destDir`, so they can be easier persisted on CI and used by non-bazel
3739
// scripts/tests.

scripts/build/package-builder.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ function buildReleasePackages(
5858
// List of targets to build. e.g. "packages/core:npm_package", or "packages/forms:npm_package".
5959
const targets = exec(queryPackagesCmd, true).split(/\r?\n/).concat(additionalTargets);
6060
const packageNames = getPackageNamesOfTargets(targets);
61-
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
61+
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
62+
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
63+
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
6264
const getBazelOutputPath = (pkgName: string) => {
6365
return pkgName === 'language-server'
6466
? join(bazelBinPath, 'vscode-ng-language-service/server/npm_package')

scripts/build/zone-js-builder.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export function buildZoneJsPackage(destDir: string): void {
3131
// Ensure the output directory is available.
3232
exec(`mkdir -p ${destDir}`);
3333

34-
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
34+
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
35+
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
36+
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
3537

3638
// Copy artifacts to `destDir`, so they can be easier persisted on CI and used by non-bazel
3739
// scripts/tests.

scripts/diff-release-package.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ async function main(packageName: string) {
6767
git.run(['clone', '--depth=1', `https://github.com/${snapshotRepoName}.git`, tmpDir]);
6868
console.info(`--> Cloned snapshot repo.`);
6969

70+
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
71+
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
7072
const bazelBinDir = childProcess
71-
.spawnSync(bazel, ['info', 'bazel-bin'], {
73+
.spawnSync(bazel, ['--ignore_all_rc_files', 'info', 'bazel-bin'], {
7274
shell: true,
7375
encoding: 'utf8',
7476
stdio: ['pipe', 'pipe', 'inherit'],

0 commit comments

Comments
 (0)