Skip to content

Commit bdcd6de

Browse files
josephperrotthybrist
authored andcommitted
build: update to bazel version 8.4.2
Update bazel to use version 8.4.2 (cherry picked from commit 458bdcf)
1 parent 778b4cf commit bdcd6de

File tree

13 files changed

+599
-805
lines changed

13 files changed

+599
-805
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test --incompatible_strict_action_env
5353
build --experimental_remote_merkle_tree_cache
5454

5555
# Ensure that tags applied in BUILDs propagate to actions
56-
common --experimental_allow_tags_propagation
56+
common --incompatible_allow_tags_propagation
5757

5858
# Ensure sandboxing is enabled even for exclusive tests
5959
test --incompatible_exclusive_test_sandboxed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.7.1
1+
8.4.2

BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,3 @@ validate_ts_version_matching(
108108
module_lock_file = "MODULE.bazel.lock",
109109
package_json = "package.json",
110110
)
111-
112-
# This is needed following https://github.com/bazel-contrib/rules_nodejs/pull/3859
113-
toolchain(
114-
name = "node22_windows_no_exec_config_toolchain",
115-
exec_compatible_with = [],
116-
target_compatible_with = [
117-
"@platforms//os:windows",
118-
"@platforms//cpu:x86_64",
119-
],
120-
toolchain = "@node22_windows_amd64//:toolchain",
121-
toolchain_type = "@rules_nodejs//nodejs:toolchain_type",
122-
)

MODULE.bazel

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,13 @@ module(
44
name = "angular_cli",
55
)
66

7+
bazel_dep(name = "platforms", version = "1.0.0")
78
bazel_dep(name = "yq.bzl", version = "0.3.2")
89
bazel_dep(name = "rules_nodejs", version = "6.6.2")
910
bazel_dep(name = "aspect_rules_js", version = "2.8.3")
1011
bazel_dep(name = "aspect_rules_ts", version = "3.7.1")
11-
bazel_dep(name = "rules_pkg", version = "0.8.1")
12-
13-
# Alow for usage of rules_pkg@0.8.1 even though other deps want a later verison.
14-
multiple_version_override(
15-
module_name = "rules_pkg",
16-
versions = [
17-
"0.8.1",
18-
"1.1.0",
19-
],
20-
)
21-
12+
bazel_dep(name = "rules_pkg", version = "1.1.0")
13+
bazel_dep(name = "rules_cc", version = "0.1.1")
2214
bazel_dep(name = "aspect_bazel_lib", version = "2.22.0")
2315
bazel_dep(name = "bazel_skylib", version = "1.8.2")
2416
bazel_dep(name = "aspect_rules_esbuild", version = "0.24.0")
@@ -104,9 +96,6 @@ use_repo(
10496
"node24_windows_amd64",
10597
)
10698

107-
# This is needed following https://github.com/bazel-contrib/rules_nodejs/pull/3859
108-
register_toolchains("//:node22_windows_no_exec_config_toolchain")
109-
11099
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
111100
npm.npm_translate_lock(
112101
name = "npm",
@@ -172,4 +161,6 @@ register_toolchains(
172161
"@devinfra//bazel/git-toolchain:git_macos_x86_toolchain",
173162
"@devinfra//bazel/git-toolchain:git_macos_arm64_toolchain",
174163
"@devinfra//bazel/git-toolchain:git_windows_toolchain",
164+
"//tools/toolchains:dummy_cc_windows_no_exec_toolchain",
165+
"//tools/toolchains:node22_windows_no_exec_toolchain",
175166
)

MODULE.bazel.lock

Lines changed: 514 additions & 760 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/angular/ssr/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ pkg_tar(
8181
name = "npm_package_archive",
8282
srcs = [":npm_package"],
8383
extension = "tgz",
84-
strip_prefix = "./npm_package",
8584
# should not be built unless it is a dependency of another rule
8685
tags = ["manual"],
8786
)

scripts/build-packages-dist.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function buildReleasePackages(
7575
// List of targets to build. e.g. "packages/angular/cli:npm_package"
7676
const targets = exec(queryPackagesCmd, true).split(/\r?\n/);
7777
const packageNames = getPackageNamesOfTargets(targets);
78-
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
78+
const bazelBinPath = join(import.meta.dirname, '../dist/bin');
7979
const getBazelOutputPath = (pkgName: string) =>
8080
join(bazelBinPath, 'packages', pkgName, 'npm_package');
8181
const getDistPath = (pkgName: string) => join(distPath, pkgName);

scripts/build.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ export default async function (
122122
argv: { local?: boolean; snapshot?: boolean } = {},
123123
): Promise<{ name: string; outputPath: string; tarPath: string }[]> {
124124
const logger = globalThis.console;
125-
126-
const bazelBin = await _exec(`${bazelCmd} info bazel-bin`, true, logger);
125+
const bazelBin = join(import.meta.dirname, '../dist/bin');
127126

128127
await _clean(logger);
129128

scripts/diff-release-package.mts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,7 @@ async function main(packageName: string) {
6262
git.run(['clone', `https://github.com/${snapshotRepoName}.git`, tmpDir]);
6363
console.log(`--> Cloned snapshot repo.`);
6464

65-
const bazelBinDir = childProcess
66-
.spawnSync(`${bazel} info bazel-bin`, {
67-
shell: true,
68-
encoding: 'utf8',
69-
stdio: ['pipe', 'pipe', 'inherit'],
70-
})
71-
.stdout.trim();
72-
if (bazelBinDir === '') {
73-
throw new Error('Could not determine bazel-bin directory.');
74-
}
75-
65+
const bazelBinDir = join(import.meta.dirname, '../dist/bin');
7666
const outputPath = path.join(bazelBinDir, 'packages/', targetDir, 'npm_package');
7767

7868
// Delete old directory to avoid surprises, or stamping being outdated.

tests/legacy-cli/e2e_runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ async function findPackageTars(): Promise<{ [pkg: string]: PkgInfo }> {
396396
);
397397

398398
const pkgJsons = await Promise.all(
399-
pkgs.map((pkg) => realpathSync(pkg)).map((pkg) => extractFile(pkg, './package.json')),
399+
pkgs.map((pkg) => realpathSync(pkg)).map((pkg) => extractFile(pkg, 'npm_package/package.json')),
400400
);
401401

402402
return pkgs.reduce(

0 commit comments

Comments
 (0)