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

Add example of how to depend one pkg_deb .changes file #484

Merged
merged 19 commits into from
Jan 28, 2022

Conversation

aiuto
Copy link
Collaborator

@aiuto aiuto commented Dec 10, 2021

  • Improve the example about finding output file paths to show how to
    get the implicit outputs like the changes file.

Fixes #477

cc/ @phlax

- Add tests for that
- Improve the example about finding output file paths to show how to
  get the implicit outputs like the changes file.

Fixes bazelbuild#477
@phlax
Copy link

phlax commented Dec 16, 2021

thanks for this @aiuto i have tested it and, as suggested, using filegroup to pull out the debs and changes files, it works a treat

@nacl
Copy link
Collaborator

nacl commented Dec 16, 2021

I will find time to review this today or Friday.

@aiuto
Copy link
Collaborator Author

aiuto commented Dec 16, 2021

@phlax Was the example clear enough?

@phlax
Copy link

phlax commented Dec 17, 2021

Was the example clear enough?

yep. also, happy to relate use...

first, i tried to just use the pkg_deb rule i have as a src for a pkg_tar rule

this gave me the files i wanted, but it also added unwanted rulename.deb.deb files

so i then added a filegroup for each output_group of deb and changes which gave me the specific files i wanted when added to my pkg_tar

the only mistake i initially made was in thinking that it required a pkg_filegroup rather than a filegroup but not sure if that actually needs to be disambiguated, just my confusion

hope this helps

Copy link
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation updates are very useful, but I don't think we've ever quite come to a consensus on what should be in DefaultInfo. See the large comment for a starter discussion. on that.

I think what you have specified here is the right thing to do, but I am not completely sold on it. The code looks good modulo the below small suggestions in the test code.

examples/where_is_my_output/BUILD Show resolved Hide resolved
examples/where_is_my_output/README.md Outdated Show resolved Hide resolved
examples/where_is_my_output/README.md Show resolved Hide resolved
tests/deb/deb_tests.bzl Outdated Show resolved Hide resolved
tests/deb/deb_tests.bzl Outdated Show resolved Hide resolved
tests/deb/deb_tests.bzl Outdated Show resolved Hide resolved
tests/deb/deb_tests.bzl Outdated Show resolved Hide resolved
@aiuto
Copy link
Collaborator Author

aiuto commented Jan 13, 2022

@nacl If you could do a quick review again, I would like to get this in for the example, as it appears relevant to bazelbuild/bazel#7977

Copy link
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please update/reword the commit message to indicate what actually is happening here -- just a documentation/examples update.

examples/where_is_my_output/README.md Outdated Show resolved Hide resolved
@aiuto aiuto changed the title Add .changes file to pkg_deb DefaultInfo Add example of how to depend one pkg_deb .changes file Jan 28, 2022
@aiuto aiuto merged commit 068a644 into bazelbuild:main Jan 28, 2022
@aiuto aiuto deleted the i477 branch January 28, 2022 20:08
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.

Unable to use changes output file from pkg_deb in further rules
3 participants