Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PackageArtifactInfo #396

Closed
nacl opened this issue Aug 2, 2021 · 7 comments · Fixed by #752
Closed

Remove PackageArtifactInfo #396

nacl opened this issue Aug 2, 2021 · 7 comments · Fixed by #752
Labels
P2 An issue that should be worked on when time is available P3 An issue that we are not working on but will review quarterly
Milestone

Comments

@nacl
Copy link
Collaborator

nacl commented Aug 2, 2021

Packaging rules typically emit two artifacts, one named after the rule's name and is overall easy to identify, and one that is templated with a bunch of other metadata, like timestamps, change numbers, and versions, and is not so easy to identify programatically.

PackageArtifactInfo helps alleviate this problem by giving users a provider interface for identifying the complex-named artifact. Accessing it, however, requires that users implement custom rule logic to access it.

One potential way for working around this is use output groups. These can emitted in the appropriate providers, and then specific artifacts can be consumed by specifying the output_group attribute of the filegroup rule, with no custom rule logic required.

@nacl nacl added the P2 An issue that should be worked on when time is available label Aug 2, 2021
@aiuto
Copy link
Collaborator

aiuto commented Nov 1, 2021

Perhaps drop PackageArtifactInfo.

@aiuto
Copy link
Collaborator

aiuto commented Dec 6, 2021

Also see: bazelbuild/bazel#14204

@aiuto aiuto added this to the 1.0 milestone Dec 10, 2021
@aiuto
Copy link
Collaborator

aiuto commented Dec 10, 2021

The more I look at this, OutputGroupInfo is the way to specify outputs.
#484 shows why in examples/where_is_my_output.

@nacl
Copy link
Collaborator Author

nacl commented Dec 17, 2021

Another complication (and I think we had this problem regardless) is how to direct different implicit outputs to different locations. With this, you'd either have to create your own custom rule that maps everything to the right locations and emits PackageFilesInfo or somesuch, or have a lot of filegroup+pkg_files boilerplate.

It might be worth creating an more specific example use case for this. #484 may be it, but even if it isn't it is definitely a step in the right direction.

@aiuto
Copy link
Collaborator

aiuto commented Dec 24, 2021 via email

@aiuto
Copy link
Collaborator

aiuto commented Mar 3, 2022

Trying to decide what do to here. I am in favor of removing PackageFilesInfo because OutputGroup does everything needed. The less we build new, the better.

@aiuto aiuto changed the title Packaging rules should emit output groups to distinguish artifacts Remove OutputGroupInfo May 13, 2022
@aiuto aiuto changed the title Remove OutputGroupInfo Remove PackageFilesInfo May 13, 2022
@aiuto aiuto added P3 An issue that we are not working on but will review quarterly and removed P2 An issue that should be worked on when time is available labels May 13, 2022
@aiuto
Copy link
Collaborator

aiuto commented May 13, 2022

I changed this task to deleting PackageFilesInfo. It was overdesigned.

@aiuto aiuto added the P2 An issue that should be worked on when time is available label Sep 12, 2022
@aiuto aiuto changed the title Remove PackageFilesInfo Remove PackageArtifactInfo Sep 6, 2023
aiuto added a commit to aiuto/rules_pkg that referenced this issue Sep 6, 2023
Fixes bazelbuild#396

RELNOTES:
No rules return a PackageArtifactsInfo provider.
Rules which return multiple files (such as a .rpm and a .changes)
now exclusively distinguish them through OutputGroupInfo.
aiuto added a commit that referenced this issue Sep 12, 2023
* Remove PackageArtifactsInfo.

Fixes #396

RELNOTES:
No rules return a PackageArtifactsInfo provider.
Rules which return multiple files (such as a .rpm and a .changes)
now exclusively distinguish them through OutputGroupInfo.

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 An issue that should be worked on when time is available P3 An issue that we are not working on but will review quarterly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants