bazelbuild / bazelbuild/rules_license

`gather_metadata_info` does not populate the `package_info` field of the returned `TransitiveMetadataInfo`

Open
#154 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
85
Forks
37
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior
When using the `gather_metadata_info` aspect, the generated `TransitiveMetadataInfo` should have all fields populated.

## Actual Behavior
Only `deps`, `licenses`, and `traces` are populated.

## Steps to Reproduce the Problem

1. Use the `gather_metadata_info` aspect on a target
1. Inspect the returned `TransitiveMetadataInfo` provider

It looks like the call to the factory method doesn't include a reference to the gathered `PackageInfo` instances: https://github.com/bazelbuild/rules_license/blob/main/rules/licenses_core.bzl#L204-L210

Contributor guide

Open the contributing guide

Research direction

Start in rules/licenses_core.bzl around lines 204-210 and inspect how gather_metadata_info constructs TransitiveMetadataInfo. Check the factory call against the gathered PackageInfo instances, then verify that the returned provider contains deps, licenses, traces, and package_info.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.