Skip to content

fix: FILE_PATTERN needs to match cpp, cc before c and mm before m#318

Merged
lionel- merged 1 commit into
r-lib:mainfrom
sebffischer:fix-file-pattern
Sep 16, 2025
Merged

fix: FILE_PATTERN needs to match cpp, cc before c and mm before m#318
lionel- merged 1 commit into
r-lib:mainfrom
sebffischer:fix-file-pattern

Conversation

@sebffischer
Copy link
Copy Markdown
Contributor

@sebffischer sebffischer commented Sep 4, 2025

When extracting files names from build commands (to generate compile_commands.json), this file pattern causes "-c file.cpp" to become the name "file.c", because ".c" matches before ".cpp".
This will then use a C compiler instead of a C++ compiler, which gives very weird error messages like <string> not found

@shikokuchuo shikokuchuo requested a review from lionel- September 5, 2025 21:23
@lionel- lionel- merged commit 2418f01 into r-lib:main Sep 16, 2025
13 checks passed
@lionel-
Copy link
Copy Markdown
Member

lionel- commented Sep 16, 2025

Thanks!

@TimTaylor
Copy link
Copy Markdown
Contributor

TimTaylor commented Sep 22, 2025

Has this been reverted? Its disappeared from the main branch.

@lionel-
Copy link
Copy Markdown
Member

lionel- commented Sep 23, 2025

Not sure what happened! I just restored, thanks for the heads up

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