Skip to content

Don't silently ignore directories in source-include#18772

Open
woodruffw wants to merge 3 commits intomainfrom
ww/fix-16751
Open

Don't silently ignore directories in source-include#18772
woodruffw wants to merge 3 commits intomainfrom
ww/fix-16751

Conversation

@woodruffw
Copy link
Copy Markdown
Member

Summary

WIP.

This is a stab at fixing #16751. The basic observation here is that a user who tries to include something like tests/ almost certainly means tests/**, so we use the same logic as in source_dist_matcher and append **.

Closes #16751.

Test Plan

Added two new tests for this: one that ensures we transform tests/ correct and another that ensures we warn when the user passes tests (i.e. without the trailing slash).

Signed-off-by: William Woodruff <william@astral.sh>
@woodruffw woodruffw self-assigned this Mar 30, 2026
Signed-off-by: William Woodruff <william@astral.sh>
@woodruffw woodruffw marked this pull request as ready for review March 30, 2026 20:51
@woodruffw woodruffw requested a review from konstin March 30, 2026 20:51
@konstin konstin added the enhancement New feature or improvement to existing functionality label Mar 31, 2026
Signed-off-by: William Woodruff <william@astral.sh>
@woodruffw
Copy link
Copy Markdown
Member Author

Okay, I simplified this a bit -- both foo and foo/ get transformed into foo/** if foo is a directory now, which aligns with our pre-existing semantics around how single files behave.

(I've also added a test for that single-file include behavior, since I couldn't find a pre-existing one.)

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

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build backend: source-include silently ignores directory without a glob pattern

2 participants