ceylon-ide-intellij icon indicating copy to clipboard operation
ceylon-ide-intellij copied to clipboard

IntelliJ Ceylon parser lacks consistency

Open loldrup opened this issue 7 years ago • 7 comments

The IntelliJ Ceylon parser gives different output for same content at different times.

If you look at this screenshot you see an error in the build log: ceylon error 2017-06-16 13 59 00

But in this screenshot the build commences successfully: ceylon no error 2017-06-16 13 59 11

However, the only thing I did in between the two screenshots was to click the green 'run' triangle once again.

So the Ceylon parser lacks consistency.

loldrup avatar Jun 16 '17 12:06 loldrup

The first screenshot shows errors from the previous build. You fixed the error, clicked the 'run' icon which triggered a new build and started the program. The Messages window shows build errors, not errors related to the current editor. I don't think there is any issue her.

bjansen avatar Jun 16 '17 13:06 bjansen

Oh wait no actually the editor is not showing errors because of https://github.com/ceylon/ceylon-ide-intellij/issues/639.

bjansen avatar Jun 16 '17 13:06 bjansen

So I just tried it again and this is the pattern I see:

Whenever I make a change (say, putting // in front of line 16, thus removing the variable 'requestContent' that isn't used anywhere), the first time I click the green triangle, I get an error. Then clicking the red square and then green triangle, it builds and runs fine. Building again and again, it remains successful.

If I reverse the process (removing the two // from line 16) the same happens. First click of green arrow leads to build error. Then clicking the red square and then green triangle, it builds and runs fine. Building again and again, it remains successful.

I can repeat this process ad infimum, and the only change I'm making to the code is adding or removing // in front of line 16.

So it still seems like there's a consistency issue.

Second; should Ceylon really complain about line 14? It seems legit to me.

I can demonstrate this issue via Teamviewer, if you would like that.

Den 16/06/2017 3.18 PM skrev "Bastien Jansen" [email protected]:

Oh wait no actually the editor is not showing errors because of #639 https://github.com/ceylon/ceylon-ide-intellij/issues/639.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ceylon/ceylon-ide-intellij/issues/642#issuecomment-309023918, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP_NN9mZExOteHWueWTyp2uK_go471jks5sEoCHgaJpZM4N8YRK .

loldrup avatar Jun 16 '17 13:06 loldrup

Line 14 is not valid, it should be variable String responseString; (annotations must appear before the type).

bjansen avatar Jun 16 '17 13:06 bjansen

Thanks. So now the question is: why did it build the program when this error was present?

Den 16/06/2017 3.59 PM skrev "Bastien Jansen" [email protected]:

Line 14 is not valid, it should be variable String responseString; (annotations must appear before the type).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ceylon/ceylon-ide-intellij/issues/642#issuecomment-309033438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP_NGLH4XQqksIc9aLTFaMDQtY6Xekaks5sEopWgaJpZM4N8YRK .

loldrup avatar Jun 16 '17 14:06 loldrup

I guess it must be an incremental build issue:

  • modify a file to introduce an issue
  • incremental build sees a change and reports the error
  • run the build again, no change was made so the incremental build is skipped
  • an old version of your code is run (the last version that compiled successfully)

bjansen avatar Jun 16 '17 14:06 bjansen

Interesting!

If this is how incremental build is supposed to work, then I think I want to disable it. I've tried to Google how to disable it. I didn't find a good link. Do you have a link for how to do it?

Den 16/06/2017 4.08 PM skrev "Bastien Jansen" [email protected]:

I guess it must be an incremental build issue:

  • modify a file to introduce an issue
  • incremental build sees a change and reports the error
  • run the build again, no change was made so the incremental build is skipped
  • an old version of your code is run (the last version that compiled successfully)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ceylon/ceylon-ide-intellij/issues/642#issuecomment-309035601, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP_NH_urXcHxNv6oQ39RtDHvFyvBzMjks5sEoxggaJpZM4N8YRK .

loldrup avatar Jun 16 '17 14:06 loldrup