Skip to content

Commit 58f69c9

Browse files
committed
Make CodeQLPackInfo provider public.
1 parent 02100e5 commit 58f69c9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

misc/bazel/pkg.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def codeql_pkg_files(
7272

7373
_ZipInfo = provider(fields = {"zips_to_prefixes": "mapping of zip files to prefixes"})
7474

75-
_CodeQLPackInfo = provider(
75+
CodeQLPackInfo = provider(
7676
"A provider that encapsulates all the information needed to build a codeql pack.",
7777
fields = {
7878
"pack_prefix": "A prefix to add to all paths, IF the user requests so. We omit it for local installation targets of single packs (but not pack groups)",
@@ -175,7 +175,7 @@ def _codeql_pack_info_impl(ctx):
175175
zips_to_prefixes.keys(),
176176
transitive = [ctx.attr.src[DefaultInfo].files],
177177
)),
178-
_CodeQLPackInfo(
178+
CodeQLPackInfo(
179179
arch_overrides = ctx.attr.arch_overrides,
180180
files = ctx.attr.src[PackageFilegroupInfo],
181181
zips = _ZipInfo(zips_to_prefixes = zips_to_prefixes),
@@ -206,11 +206,11 @@ _codeql_pack_info = rule(
206206
"prefix": attr.string(doc = "Prefix to add to all files."),
207207
"arch_overrides": attr.string_list(doc = "A list of files that should be included in the arch package regardless of the path, specify the path _without_ `prefix`."),
208208
},
209-
provides = [_CodeQLPackInfo],
209+
provides = [CodeQLPackInfo],
210210
)
211211

212212
_CODEQL_PACK_GROUP_EXTRACT_ATTRS = {
213-
"srcs": attr.label_list(providers = [_CodeQLPackInfo], mandatory = True, doc = "List of `_codeql_pack_info` rules (generated by `codeql_pack`)."),
213+
"srcs": attr.label_list(providers = [CodeQLPackInfo], mandatory = True, doc = "List of `_codeql_pack_info` rules (generated by `codeql_pack`)."),
214214
"apply_pack_prefix": attr.bool(doc = "Set to `False` to skip adding the per-pack prefix to all file paths.", default = True),
215215
"kind": attr.string(doc = "Extract only the commmon, arch-specific, or all files from the pack group.", values = ["common", "arch", "all"]),
216216
"prefix": attr.string(doc = "Prefix to add to all files, is prefixed after the per-pack prefix has been applied.", default = ""),
@@ -228,7 +228,7 @@ def _codeql_pack_group_extract_files_impl(ctx):
228228

229229
platform, apply_pack_prefix, include_all_files = _codeql_pack_group_extract_options(ctx)
230230
for src in ctx.attr.srcs:
231-
src = src[_CodeQLPackInfo]
231+
src = src[CodeQLPackInfo]
232232
if src.files.pkg_dirs or src.files.pkg_symlinks:
233233
fail("`pkg_dirs` and `pkg_symlinks` are not supported for codeql packaging rules")
234234
prefix = paths.join(ctx.attr.prefix, src.pack_prefix) if apply_pack_prefix else ctx.attr.prefix
@@ -271,7 +271,7 @@ def _codeql_pack_group_extract_zips_impl(ctx):
271271

272272
platform, apply_pack_prefix, include_all_files = _codeql_pack_group_extract_options(ctx)
273273
for src in ctx.attr.srcs:
274-
src = src[_CodeQLPackInfo]
274+
src = src[CodeQLPackInfo]
275275
prefix = paths.join(ctx.attr.prefix, src.pack_prefix) if apply_pack_prefix else ctx.attr.prefix
276276

277277
# for each zip file, resolve whether it's filtered out or not by the current kind, and add the pack prefix

0 commit comments

Comments
 (0)