Skip to content

Commit 6408112

Browse files
committed
Restore adding of std lib dependencies for to dep graph
1 parent 853aad4 commit 6408112

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

codeql_bundle/helpers/bundle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def add_to_graph(pack: ResolvedCodeQLPack, processed_packs: set[ResolvedCodeQLPa
296296
logger.debug(f"Adding stdlib dependency {std_lib_dep.config.name}@{str(std_lib_dep.config.version)} to {pack.config.name}@{str(pack.config.version)}")
297297
pack.dependencies.append(std_lib_dep)
298298
logger.debug(f"Adding pack {pack.config.name}@{str(pack.config.version)} to dependency graph")
299-
pack_sorter.add(pack)
299+
pack_sorter.add(pack, *pack.dependencies)
300300
for dep in pack.dependencies:
301301
if dep not in processed_packs:
302302
add_to_graph(dep, processed_packs, std_lib_deps)
@@ -537,7 +537,9 @@ def bundle_query_pack(pack: ResolvedCodeQLPack):
537537
self.bundle_path / "qlpacks",
538538
)
539539

540-
for pack in pack_sorter.static_order():
540+
sorted_packs = list(pack_sorter.static_order())
541+
logger.debug(f"Sorted packs: {' -> '.join(map(lambda p: p.config.name, sorted_packs))}")
542+
for pack in sorted_packs:
541543
if pack.kind == CodeQLPackKind.CUSTOMIZATION_PACK:
542544
bundle_customization_pack(pack)
543545
elif pack.kind == CodeQLPackKind.LIBRARY_PACK:

0 commit comments

Comments
 (0)