Closed csm10495 closed 5 years ago
When checking this, am I correct that multiple input files is completely broken? As in, it just doesn't work at all?
Yep. Try it with 2+ input files. Making that change in the Preprocessor class seems to fix it, though it's a bit of a hack.
Bah. I do apologise. There were problems in this area before which I thought was fixed, but as just demonstrated, not writing a unit test to check for a specific situation means that specific situation breaks. I'll need to write a test specifically for this case, and then fix the bug so it never happens again.
Turns out that this bug was much bigger than you reported, #include
didn't work if no -I
had been specified, which was rather serious. Thanks for reporting this bug!
I think based off the code:
It seems to act like the each file is just # included, which is clever, though I always get errors in finding the files like below:
Single inputs seem to work fine
This has to do with it not having a path to look for the file in... we can sort-of cheat to make this work by defaulting:
in the Preprocessor class, since now we always have a root path to start with and build off of. I guess a potential issue is if you code files in the root, they may get incorrectly included as opposed to the correct one (via -I)
@ned14 is this a valid fix? I'm happy to PR if needed :)