Skip to content

Commit 02100e5

Browse files
committed
Address review.
1 parent ede0b5b commit 02100e5

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

misc/bazel/pkg.bzl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,16 @@ def _codeql_pack_info_impl(ctx):
171171
for zip in zip_target.files.to_list():
172172
zips_to_prefixes[zip] = prefix
173173
return [
174-
DefaultInfo(files = depset(zips_to_prefixes.keys(), transitive = [ctx.attr.src[DefaultInfo].files])),
175-
_CodeQLPackInfo(arch_overrides = ctx.attr.arch_overrides, files = ctx.attr.src[PackageFilegroupInfo], zips = _ZipInfo(zips_to_prefixes = zips_to_prefixes), pack_prefix = ctx.attr.prefix),
174+
DefaultInfo(files = depset(
175+
zips_to_prefixes.keys(),
176+
transitive = [ctx.attr.src[DefaultInfo].files],
177+
)),
178+
_CodeQLPackInfo(
179+
arch_overrides = ctx.attr.arch_overrides,
180+
files = ctx.attr.src[PackageFilegroupInfo],
181+
zips = _ZipInfo(zips_to_prefixes = zips_to_prefixes),
182+
pack_prefix = ctx.attr.prefix,
183+
),
176184
]
177185

178186
_codeql_pack_info = rule(
@@ -369,7 +377,7 @@ def codeql_pack_group(name, srcs, visibility = None, skip_installer = False, pre
369377
Prefixes all paths in the pack group with `prefix`.
370378
371379
The compression level of the generated zip files can be set with `compression_level`. Note that this doesn't affect the compression
372-
level of extra zip files that are added to a pack, as thes files will not be re-compressed.
380+
level of extra zip files that are added to a pack, as these files will not be re-compressed.
373381
"""
374382
internal = _make_internal(name)
375383

swift/BUILD.bazel

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,13 @@ codeql_pkg_files(
7171
],
7272
)
7373

74-
pkg_filegroup(
75-
name = "swift-files",
74+
codeql_pack(
75+
name = "swift",
7676
srcs = [
7777
":root-files",
7878
":tools",
7979
"//swift/downgrades",
8080
],
81-
visibility = ["//visibility:public"],
82-
)
83-
84-
# WARNING: This pack is re-defined internally, with an appropriate transition
85-
# to switch the internal toolchain to the correct x86-macos one.
86-
# Therefore, check there before making any changes to this pack definition.
87-
codeql_pack(
88-
name = "swift",
89-
srcs = [":swift-files"],
9081
zips = select({
9182
"@platforms//os:windows": {},
9283
"//conditions:default": {

0 commit comments

Comments
 (0)