Skip to content

Append workspace name to the runfiles directory name for pkg_files#864

Merged
aiuto merged 3 commits intobazelbuild:mainfrom
sitaktif:append-workspace-name-pkg-files
May 1, 2024
Merged

Append workspace name to the runfiles directory name for pkg_files#864
aiuto merged 3 commits intobazelbuild:mainfrom
sitaktif:append-workspace-name-pkg-files

Conversation

@sitaktif
Copy link
Copy Markdown
Contributor

This is a follow-up to #856, which applies to most rules but pkg_files uses a different code path. This change applies the fix to pkg_files and adds a test to avoid future regressions.

It also fixes a (silent) bug in the test logic.

@sitaktif sitaktif requested review from aiuto and cgrindel as code owners April 25, 2024 14:40
@sitaktif sitaktif force-pushed the append-workspace-name-pkg-files branch from 474def6 to 6164b24 Compare April 25, 2024 14:57
@sitaktif
Copy link
Copy Markdown
Contributor Author

@aiuto this should probably make it before the next release to avoid confusion.

The test wasn't asserting anything about the destination path because it
was missing the `env` positional parameter; the "assert_true" was tested
against the assertion message (which always evaluates to True as a
non-empty string).
Commit a811e7f recently fixed an issue
where the workspace name was missing from the path for runfiles added
via `pkg_tar` and some other rules.

This extends the fix to `pkg_files` as well.
@sitaktif sitaktif force-pushed the append-workspace-name-pkg-files branch from 6164b24 to 18db8ce Compare April 26, 2024 09:36
@sitaktif
Copy link
Copy Markdown
Contributor Author

sitaktif commented May 1, 2024

Thanks @cgrindel - I don't have write access so I'll defer merging to you.

@cgrindel
Copy link
Copy Markdown
Collaborator

cgrindel commented May 1, 2024

@aiuto Do you want to look at this before we merge?

Copy link
Copy Markdown
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

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

Thanks for catching this one.

@aiuto aiuto merged commit bf4609b into bazelbuild:main May 1, 2024
@sitaktif
Copy link
Copy Markdown
Contributor Author

sitaktif commented May 1, 2024

Thanks!

@sitaktif sitaktif deleted the append-workspace-name-pkg-files branch May 1, 2024 13:52
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.

3 participants