Skip to content

RunfilesGroupInfo: store runfiles objects instead of depset[File]#16

Merged
malt3 merged 1 commit into
mainfrom
extend_rgi_to_contain_all_runfiles_fields
May 11, 2026
Merged

RunfilesGroupInfo: store runfiles objects instead of depset[File]#16
malt3 merged 1 commit into
mainfrom
extend_rgi_to_contain_all_runfiles_fields

Conversation

@malt3
Copy link
Copy Markdown
Collaborator

@malt3 malt3 commented May 11, 2026

Each field in RunfilesGroupInfo now holds a full runfiles object (files, empty_filenames, symlinks, root_symlinks) rather than just a depset of files. The invariant becomes: merging all group runfiles must equal DefaultInfo.default_runfiles.

Key changes:

  • ordered_groups returns struct(name, runfiles, metadata)
  • collect_groups takes ctx, auto-creates "data#" groups for deps without RunfilesGroupInfo (enabling natural deduplication when the same data dep appears in multiple parts of the graph)
  • merge_to_limit uses runfiles.merge_all() to combine groups
  • Analysis test checks all four runfiles components for completeness and overlap

Each field in RunfilesGroupInfo now holds a full runfiles object
(files, empty_filenames, symlinks, root_symlinks) rather than just a
depset of files. The invariant becomes: merging all group runfiles must
equal DefaultInfo.default_runfiles.

Key changes:
- ordered_groups returns struct(name, runfiles, metadata)
- collect_groups takes ctx, auto-creates "data#<label>" groups for deps
  without RunfilesGroupInfo (enabling natural deduplication when the same
  data dep appears in multiple parts of the graph)
- merge_to_limit uses runfiles.merge_all() to combine groups
- Analysis test checks all four runfiles components for completeness and
  overlap
@malt3 malt3 force-pushed the extend_rgi_to_contain_all_runfiles_fields branch from 3c88781 to 77bdead Compare May 11, 2026 12:23
@malt3 malt3 merged commit 78c2200 into main May 11, 2026
5 checks passed
@malt3 malt3 deleted the extend_rgi_to_contain_all_runfiles_fields branch May 11, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant