Skip to content

Fix/restore user include paths#18

Merged
0pendev merged 2 commits intomainfrom
fix/restore-user-include-paths
May 5, 2026
Merged

Fix/restore user include paths#18
0pendev merged 2 commits intomainfrom
fix/restore-user-include-paths

Conversation

@N3ur0sis
Copy link
Copy Markdown
Contributor

Hey @0pendev — tried bumping my fuzz pipeline to v1.1.1 and hit a regression where every user-supplied -I/-isystem/-iquote/-idirafter is dropped (only -D survives). Same flags work on v1.1.0.

I poked at it a bit and it looks like user includes never make it from driver.includes to the preprocessor's search path — small tweak in Parser.init + include_paths.zig and it's happy again. Tossed in a regression test too. Tests pass and my campaigns run fine on this build. Mind taking a look when you have a sec? 🙏

Add an integration test that requires the preprocessor to honour a
user-supplied `-I` directory.

The fixture places `inner.h` in a sibling subdirectory `inc/` so the
includer's-own-directory rule cannot find it. The `.flags` sidecar
passes `-I tests/user_include_path_resolution/inc` and the test only
passes if absolution forwards that path to `comp.search_path`.

This currently fails on v1.1.1 because `Driver.parseArgs` accumulates
`-I/-isystem/-iquote/-idirafter` into `driver.includes` but
`Parser.init` never commits the result to the compilation's search
path, so every user-supplied include path is invisible to the
preprocessor. The next commit restores that wiring and turns the test
green.
@N3ur0sis N3ur0sis requested a review from 0pendev as a code owner April 28, 2026 13:47
@N3ur0sis N3ur0sis added the bug Something isn't working label Apr 28, 2026
@0pendev
Copy link
Copy Markdown
Collaborator

0pendev commented May 5, 2026

Nice catch I'll have a look at it later this week 🙌

Copy link
Copy Markdown
Collaborator

@0pendev 0pendev left a comment

Choose a reason for hiding this comment

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

💯

@0pendev 0pendev merged commit db0d941 into main May 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants