slynch8 / 10x

10x IDE/Editor
191 stars 34 forks source link

File name collision prevents header parsing #1314

Open ghost opened 1 year ago

ghost commented 1 year ago

Including a standard header file from a file with the same name prevents the standard file from being parsed (go to definition does not work, highlighting is not updated).

For example

#include "D:/MyStuff/math.h"

And inside that file:

#include <math.h>
ghost commented 1 year ago

@slynch8 Sorry to bother, have you seen this?

Some of the standard headers (not the example) are huge and included everywhere (for whatever reason some even include a tree of other files outside their guard). So in my (not to be shipped) code I use dummy files that add a guard on the include itself so that the actual files are not loaded and preprocessed 20 times by the compiler, and they naturally have the same file name.

If something can be done about this, I would really appreciate it. If not I guess I'll just modify my janky stuff.

slynch8 commented 1 year ago

It sounds like <> paths are not being handled correctly. I'll be taking a look at this soon.