boocs / ue4-intellisense-fixes

Automatically fixes VSCode/Unreal Engine Intellisense Config bugs on startup
MIT License
162 stars 9 forks source link

Getting “No match found for RegExp(<BIG_REGEX>) on file: path/to/source” on startup (M1 Mac) #17

Open yggie opened 2 years ago

yggie commented 2 years ago

I keep getting the above error on startup, with the extension suggesting I regenerate the project files. This did not help at all.

After digging into the code a bit, I found the issue was related to how the generated files are structured. For example, the definitions file is located in:

/Users/name/path/to/MyProject/Intermediate/Build/Mac/x86_64/UnrealEditor/Development/MyProject/Definitions.MyProject.h

But the regex cannot capture the above because it only expects a single directory between Build and UnrealEditor.

https://github.com/boocs/ue4-intellisense-fixes/blob/efaa1ed3df2fedd8d23fcf9cbbe439492c0a998f/src/extension/fixes/generated.ts#L17

Managed to patch the extension locally and it worked, will post a PR with the fix

boocs commented 2 years ago

Can you tell me the path where all your *.generated.h files are? They should be somewhere in the Intermediate/Build directory. They also can be in multiple directories from different configs you've used to Build your project.