-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Unable to recognise valid methods #2192
Comments
It may be a problem with the Intellephense index workspace. |
So there were no errors showing, all looking okay, but I thought, why not run the "Index workspace" now, just to freshen everything up. Making a modification to the base class (like swapping @return an @throws around) obviously resets these indexes. And running the "Index workspace" builds them all again, but we still have an error appearing. Would the size of the base class be causing a problem. It's 31919 lines long (remember it's generated). It's the largest generated file I have, which is why it might be happening to this file and none of the others. Is there some logging I can turn on for the Index workspace to generate some output? |
Glad you solved it. There should be a warning in the output logs in cases like this. In my experience users don't like popups on their screen so will keep the notice in the output log for now. |
Describe the bug
![image](https://user-images.githubusercontent.com/5810216/160495771-b193c9cd-678f-472a-b1c9-ffea78b2eed7.png)
Valid functions are being highlighted as non-existent.
Here you can see the function exists in the base class.
![image](https://user-images.githubusercontent.com/5810216/160495916-2eb2583f-172a-475a-9ead-242153fe08f7.png)
I have no idea why this happens, however I've been looking into the Base class to see if there is anything odd, but there isn't.
![image](https://user-images.githubusercontent.com/5810216/160496381-fd03dce7-65bf-476e-829c-70c597bd7d6c.png)
(PS The Base class is generated by PropelORM)
For example, see this "hydrate" function (from the Base class):
If I change the order of @return and @throws so that it looks like this:
![image](https://user-images.githubusercontent.com/5810216/160496533-254c2720-003a-43da-9bbe-81ab84771e40.png)
And then save this change.
![image](https://user-images.githubusercontent.com/5810216/160496628-922d89b0-b099-4b4d-a87b-0b5094f9bf6a.png)
Suddenly all of the errors in the School class now disappear:
I'm sure you are probably thinking, that doesn't make any sense at all, and I quite believe you.
I'm going to wait for a few hours and see if it comes back. I will update this post later.
To Reproduce
Sorry, I have no idea about how to reproduce it.
I have 287 tables with these generated classes, and this is the only one it happens on.
Expected behavior
Obviously Intelephense should be able to recognise the function that exists in the base class.
Screenshots
Included above.
Platform and version
I've just loaded OSX 12 (Monterey) on a new M1 MBP
And from vscode:
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:49.188Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.3.0
The text was updated successfully, but these errors were encountered: