Skip to content

Fix checktest marking subdirectory FilePaths as imports on Windows - #34

Open
mkanat wants to merge 1 commit into
bufbuild:mainfrom
mkanat:checktest-windows-file-paths
Open

mkanat wants to merge 1 commit into
bufbuild:mainfrom
mkanat:checktest-windows-file-paths

Conversation

@mkanat

@mkanat mkanat commented Oct 21, 2026 •

Copy link
Copy Markdown

On Windows, checktest marks a FilePaths entry in a subdirectory, such as foo/bar.proto, as an import, so rules that skip imports never check it. compile gives the compiler OS-separated paths, so the file descriptor is named foo\bar.proto, but it looks up imports by forward-slash paths.

This passes forward-slash paths to the compiler, so file names match and use the same separators as everywhere else in .proto files, and adds a test with a file in a subdirectory.

🤖 Generated with Claude Code

checktest compiled FilePaths with OS separators, so on Windows a file in a subdirectory was named with backslashes and didn't match the forward-slash names used to tell FilePaths from imports, which marked it as an import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mkanat
mkanat marked this pull request as ready for review October 21, 2026 07:19

@emcfarlane emcfarlane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix!

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