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

Unable to recognise valid methods #2192

Closed
murraycollingwood opened this issue Mar 28, 2022 · 4 comments
Closed

Unable to recognise valid methods #2192

murraycollingwood opened this issue Mar 28, 2022 · 4 comments

Comments

@murraycollingwood
Copy link

murraycollingwood commented Mar 28, 2022

Describe the bug
Valid functions are being highlighted as non-existent.
image

Here you can see the function exists in the base class.
image

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.
(PS The Base class is generated by PropelORM)
For example, see this "hydrate" function (from the Base class):
image

If I change the order of @return and @throws so that it looks like this:
image

And then save this change.
Suddenly all of the errors in the School class now disappear:
image

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

@tianyiw2013
Copy link

tianyiw2013 commented Mar 29, 2022

It may be a problem with the Intellephense index workspace.
Saving the file will trigger Intellephense index workspace, So the problem disappeared.
Try calling the command Intellephense: Index workspace the next time something like this happens.

#1898

@murraycollingwood
Copy link
Author

So there were no errors showing, all looking okay, but I thought, why not run the "Index workspace" now, just to freshen everything up.
As soon as it was done the errors all returned....
image

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?

@murraycollingwood
Copy link
Author

GOT IT !!!

The default file size is 1000000 (eg roughly 1mb), my file is 1.2mb.
I changed the max file size to 2000000.
image

I then ran Index workspace and all the errors have gone!

Is it possible to popup a notification about the maximum file size being exceeded? This might be helpful for other people having the same problem.

@bmewburn
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants