panicinc / icarus

Swift, C, C++, and Objective-C Support for Nova
MIT License
70 stars 5 forks source link

Bug: `cannot find <object> in scope` issue is emitted but the object does exist. #15

Open PadraigK opened 1 year ago

PadraigK commented 1 year ago

When I create a new file and define a new class, referencing the new class in another file will produce a cannot find <object> in scope error. It persists through builds (which work fine). The menu option to clear issues from previous builds doesn't remove it.

The only way I know to clear this error is to toggle off the Icarus extension and then toggle it on again.

Screenshot 2023-10-05 at 11 08 45 AM Screenshot 2023-10-05 at 11 08 35 AM

I reproduced this from a fresh launch and watched the extension console, but nothing was emitted there as I added the file and referenced it.

I also noticed that the LSP will crash with a notification if I delete a file, in case that's relevant.

PadraigK commented 1 year ago

This is with Xcode 15 as my xcode-select Xcode and no custom settings on Icarus.

PadraigK commented 1 year ago

The new file part is the key thing, I can make a new class in an existing file and everything works fine, but as soon as I move the class into a new file, this error appears and won't go away until the LSP restarts.

alicerunsonfedora commented 10 months ago

I noticed this as well when generating a new file altogether. The LSP doesn't seem to recognize it until I close and re-open the project.