Skip to content

Conversation

@aiuto
Copy link
Collaborator

@aiuto aiuto commented Sep 18, 2023

Bring tar runfiles up to feature parity with pkg_files.runfiles.

The bulk of the change is to have pkg_tar use pkg_files%add_label_list to process srcs. That brings it in conformance with pkg_files and pkg_zip. This changes the behavior of runfiles to be useful, but it is a breaking change.

Fixes: #153
Fixes: #579

Other bits:

  • do not fail verify_archive_test without a min_size or max_size
  • change data file in the sample executable from BUILD to foo.cc so that it is easier to disambiguate from other files.
  • fix bug in runfiles support where files were not added to file_deps list.
  • fix bug in runfiles support where the runfiles base path was not computed correctly.
  • buildifier to make the linters happy.

RELNOTES: Improved runfiles support in pkg_tar. Breaking change: we now require a Bazel that supports lambdas.

@alexeagle
Copy link
Contributor

@aiuto what's needed to make this draft Ready for review? We're eager to get this in to fix python images.

@aiuto
Copy link
Collaborator Author

aiuto commented Sep 30, 2023

The refactoring PR #756 has to go in first. Then I need to rebase on that and add a legacy option.
It would also help if #749 were in too, then I can import to Google and test the legacy option.
About a day's work, when I get back from vacation.

@aiuto aiuto self-assigned this Oct 18, 2023
@aiuto aiuto added the P1 An issue that must be resolved. Must have an assignee label Oct 18, 2023
@dieortin
Copy link
Contributor

@aiuto both PRs are merged, is there anything we could do to help with this?

@aiuto
Copy link
Collaborator Author

aiuto commented Nov 22, 2023 via email

The bulk of the change is to have pkg_tar use pkg_files%add_label_list to
process srcs.  That brings it in conformance with pkg_files and pkg_zip.
This changes the behavior of runfiles to be useful, but it is a breaking
change.

Fixes: bazelbuild#153
Fixes: bazelbuild#579

Other bits:
- do not fail verify_archive_test without a min_size or max_size
- change `data` file in the sample executable from BUILD to foo.cc so
  that it is easier to disambiguate from other files.
- fix bug in runfiles support where files were not added to file_deps list.
- fix bug in runfiles support where the runfiles base was not computed
  correctly.
- buildifier to make the linters happy.
@aiuto aiuto marked this pull request as ready for review November 22, 2023 19:19
@aiuto aiuto requested a review from alexeagle as a code owner November 22, 2023 19:20
@aiuto aiuto requested a review from sdtwigg November 22, 2023 19:20
@aiuto aiuto requested a review from jylinv0 as a code owner November 22, 2023 19:27
@aiuto aiuto requested review from cgrindel and removed request for jylinv0 November 28, 2023 03:38
@aiuto aiuto merged commit 1788b97 into bazelbuild:main Nov 28, 2023
@aiuto aiuto deleted the tar_runfiles branch November 28, 2023 16:34
@storm-of-fists
Copy link

will this change be pulled into an official release sometime soon? looks like the latest was from may

@aiuto
Copy link
Collaborator Author

aiuto commented Jan 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 An issue that must be resolved. Must have an assignee

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Packaging binaries with runfiles tree Fix and document pkg_tar() runfiles support.

5 participants