Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Parser not detecting functions that exist in the same file. #191

Open
Tedster59 opened this issue Jul 23, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@Tedster59
Copy link

Describe the bug

After sticking with version 0.6.3 or so for a while, I was trying 7.1 and now 8.1, and I'm seeing that the parser is failing to find function references that exist in the same file. I'm not sure if there's an issue with the project I'm working on being too large or if there is some other issue, such as too many custom macros, or the fact XCOM 2 uses a custom version of UE3 that is more like a UE3.5

Using VSCode 1.91.1 and extension version 0.8.1 right now.

Screenshots

For example, it's not detecting this function, as well as several that are called as part of this event.
image

Ctrl F for it, the function is definitely here.

image

@EliotVU EliotVU added the bug Something isn't working label Jul 23, 2024
@EliotVU
Copy link
Owner

EliotVU commented Jul 23, 2024

Yes, usually caused by in-lined macros that the extension is not aware of.

@Tedster59
Copy link
Author

Hmm, what's the best way to make it aware of the custom macros? They are defined in an extra_globals.uci file that is in a folder that is part of the vscode workspace. I've also noticed it sometimes failing to find class definitions that it would before.

@Tedster59
Copy link
Author

Tedster59 commented Jul 23, 2024

Also potentially related, in the same file, it will find the class definition, but then fail to find it farther down the file.
found, go to definition works, etc.

This class is mentioned 57 times in the file per ctrl-f search, and the first five are correctly identified.
image

#6 and afterwards are not located and go to definition does nothing.
image

Some functions are not underlined red, but Go To Definition doesn't work on them.
image

image

File being used in these examples is: https://github.com/long-war-2/lwotc/blob/beta/LongWarOfTheChosen/Src/LW_Overhaul/Classes/X2DownloadableContentInfo_LongWarOfTheChosen.uc

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

No branches or pull requests

2 participants