Skip to content

Commit

Permalink
Bazel/C#: adjust DefaultInfo in codeql_pkg_files_overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed May 21, 2024
1 parent b19bf2f commit 3c52e3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/bazel/pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo"
def _pkg_overlay_impl(ctx):
destinations = {}
files = []
depsets = []

for src in reversed(ctx.attr.srcs):
pfi = src[PackageFilesInfo]
Expand All @@ -14,14 +15,15 @@ def _pkg_overlay_impl(ctx):
attributes = pfi.attributes,
)
files.append((new_pfi, src.label))
depsets.append(depset(dest_src_map.values()))
return [
PackageFilegroupInfo(
pkg_files = reversed(files),
pkg_dirs = [],
pkg_symlinks = [],
),
DefaultInfo(
files = depset(transitive = [src[DefaultInfo].files for src in ctx.attr.srcs]),
files = depset(transitive = reversed(depsets)),
),
]

Expand Down

0 comments on commit 3c52e3b

Please sign in to comment.