IllegalArgumentException: No PSI node found for ceylon node #285
Comments
This one is getting annoying. Do we understand why it happens? |
It happens when the parsed PSI is different from the root node that's in the global model (I think it only happens for external phased units). |
It might be related to #342 then ? |
@gavinking : Is there a precise scenario that makes this appear systematically? |
I mean a precise case when searching for implementations that always triggers this exception. I never had this recently when searching for implementations through the |
@davidfestal it happens randomly from time to time. If you use the IntelliJ IDE for development, you will see it. |
(It is nothing to do with searching for implementations.) |
Ah, OK, I mentioned it because it was in the 2 stacktraces you pasted. |
I get this too with today's (yesterday's) nightly build... |
@gavinking , @luolong : Could you paste the stackTrace here each time this happens ? This will give more information about the various use-cases. Thanks. |
|
|
Thanks for the stackTraces. That should help. |
|
@bjansen : there is at least one case when this situation would be expected and we shouldn't throw a runtime exception IMO: When you migrate a Java file to Ceylon, at the beginning you might tolerate a duplicate class error. And in this case, when you open the Java file, it will try to find references to the Java (now duplicated) Class, and will finally try to find the node inside the new Ceylon file instead of the Java file, and it throws though there is no critical error. This type of situation might also happen in the case of natives, when you might have several files containing a declaration with the same name. |
…allow finding out the root cause.
Apart from the 2 specific cases mentioned above (duplicate name and guarded variables), there was another very frequent use-case for this situation:
When a |
@davidfestal Yeah, I always figured something like that must be going on. |
for #285: No PSI node found for ceylon node
@davidfestal I have not seen this for a long time, so I assume it's fixed now? |
@davidfestal Ping? |
I've seen one recently. But it might be expected since I renamed a unit and then had a duplicate declaration error for some minutes. |
I get stuff like:
The text was updated successfully, but these errors were encountered: