fix: Not all runfiles are single files#860
Merged
aiuto merged 3 commits intobazelbuild:mainfrom Apr 29, 2024
Merged
Conversation
cgrindel
reviewed
Apr 23, 2024
pkg/private/pkg_files.bzl
Outdated
| mapping_context.content_map[d_path] = _DestFile( | ||
| src = rf, | ||
| entry_type = ENTRY_IS_FILE, | ||
| entry_type = ENTRY_IS_DIR if rf.is_directory else ENTRY_IS_FILE, |
Collaborator
There was a problem hiding this comment.
Is there an example/test that we can add to ensure that this works?
Collaborator
|
Please add a test for this. We need those to prevent regressing the next
time someone fixes things.
…On Tue, Apr 23, 2024 at 2:38 PM Chuck Grindel ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/private/pkg_files.bzl
<#860 (comment)>:
> @@ -436,7 +435,7 @@ def add_from_default_info(
_check_dest(mapping_context.content_map, d_path, rf, src.label, mapping_context.allow_duplicates_with_different_content)
mapping_context.content_map[d_path] = _DestFile(
src = rf,
- entry_type = ENTRY_IS_FILE,
+ entry_type = ENTRY_IS_DIR if rf.is_directory else ENTRY_IS_FILE,
Is there an example/test that we can add to ensure that this works?
—
Reply to this email directly, view it on GitHub
<#860 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHEOAHB5HOZXZQ3WDITY62TBZAVCNFSM6AAAAABGTVFH6WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJYGAZTENZYGE>
.
You are receiving this because your review was requested.Message ID:
<bazelbuild/rules_pkg/pull/860/review/2018032781 ***@***.***
.com>
|
Handle cases where the defaultInfo file is a directory
76eee63 to
b646724
Compare
Contributor
Author
394ad43 to
f3f3d1e
Compare
aiuto
reviewed
Apr 24, 2024
f3f3d1e to
1a87c87
Compare
This should build and test clean, with no implicit flags
aiuto
approved these changes
Apr 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle cases where the defaultInfo file is a directory