Skip to content

Commit e4fed3c

Browse files
committed
Disable Windows-specific paths in Gerrit's rules_nodejs fork
Gerrit does not support Windows builds, so stop selecting Windows-specific behavior in the forked rules_nodejs snapshot. Hardcode the non-Windows path in js_library and related helper rules, and always use the .sh packaging entry points. This avoids Bazel 8 deprecation warnings from host_windows condition targets and also avoids the visibility regression triggered by replacing them with @platforms//os:windows. This keeps Linux and macOS builds working while making the fork explicitly Unix-only.
1 parent a66fc4f commit e4fed3c

6 files changed

Lines changed: 7 additions & 28 deletions

File tree

internal/common/copy_to_bin.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ def copy_to_bin(name, srcs, **kwargs):
5757
_copy_to_bin(
5858
name = name,
5959
srcs = srcs,
60-
is_windows = select({
61-
"@platforms//os:windows": True,
62-
"//conditions:default": False,
63-
}),
60+
is_windows = False,
6461
**kwargs
6562
)

internal/common/params_file.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ def params_file(
124124
args = args,
125125
data = data,
126126
newline = newline or "auto",
127-
is_windows = select({
128-
"@platforms//os:windows": True,
129-
"//conditions:default": False,
130-
}),
127+
is_windows = False,
131128
**kwargs
132129
)

internal/js_library/js_library.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,6 @@ def js_library(
416416
# which is still being used in a couple of tests
417417
# TODO: remove once legacy module_mapping is removed
418418
module_name = package_name if package_name != "$node_modules$" else None,
419-
is_windows = select({
420-
"@platforms//os:windows": True,
421-
"//conditions:default": False,
422-
}),
419+
is_windows = False,
423420
**kwargs
424421
)

internal/linker/npm_link.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ set to the target's package & the files provided from the targets DefaultInfo.
150150
deps = [target],
151151
package_name = package_name,
152152
package_path = package_path,
153-
is_windows = select({
154-
"@platforms//os:windows": True,
155-
"//conditions:default": False,
156-
}),
153+
is_windows = False,
157154
**kwargs
158155
)

internal/pkg_npm/pkg_npm.bzl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,18 +375,12 @@ def pkg_npm_macro(name, tgz = None, **kwargs):
375375

376376
native.alias(
377377
name = name + ".pack",
378-
actual = select({
379-
"@platforms//os:windows": name + ".pack.bat",
380-
"//conditions:default": name + ".pack.sh",
381-
}),
378+
actual = name + ".pack.sh",
382379
)
383380

384381
native.alias(
385382
name = name + ".publish",
386-
actual = select({
387-
"@platforms//os:windows": name + ".publish.bat",
388-
"//conditions:default": name + ".publish.sh",
389-
}),
383+
actual = name + ".publish.sh",
390384
)
391385

392386
if tgz != None:

third_party/github.com/bazelbuild/bazel-skylib/rules/private/copy_file_private.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,7 @@ def copy_file(name, src, out, is_directory = False, is_executable = False, allow
202202
name = name,
203203
src = src,
204204
out = out,
205-
is_windows = select({
206-
"@platforms//os:windows": True,
207-
"//conditions:default": False,
208-
}),
205+
is_windows = False,
209206
is_executable = is_executable,
210207
allow_symlink = allow_symlink,
211208
**kwargs

0 commit comments

Comments
 (0)