After some edits to code completion I got the following exception after running core inside of eclipse to test the changes:
2012-08-16 12:49:27,791 DEBUG [main] - System.out - java.lang.NoSuchFieldError: block$3
at scala.tools.eclipse.ui.ScalaCompletionProposal.apply(ScalaCompletionProposa l.scala:107)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal (CompletionProposalPopup.java:933)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelected ProposalWithMask(CompletionProposalPopup.java:881)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(Comp letionProposalPopup.java:1307)
at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.veri fyKey(ContentAssistant.java:807)
...
It looks like binary incompatibility. Interestingly all works fine after a clean and rebuild of the project, but with each new change it is broken again. How can that be?
> After some edits to code completion I got the following exception after running core inside of eclipse to test the changes:
> 2012-08-16 12:49:27,791 DEBUG [main] - System.out - java.lang.NoSuchFieldError: block$3
> at scala.tools.eclipse.ui.ScalaCompletionProposal.apply(ScalaCompletionProposa l.scala:107)
> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal (CompletionProposalPopup.java:933)
> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelected ProposalWithMask(CompletionProposalPopup.java:881)
> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(Comp letionProposalPopup.java:1307)
> at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.veri fyKey(ContentAssistant.java:807)
> ...
> It looks like binary incompatibility. Interestingly all works fine after a clean and rebuild of the project, but with each new change it is broken again. How can that be?
After compiling I started core (in Run or Debug mode; it doesn't matter) and tried to do some code completion. After choosing one of the methods, suggested by the completion pop-up, the exception occurs when control flow arrives at the changed foreach block.
On Sa 18 Aug 2012 19:33:07 CEST, Mirco Dotta wrote:
> That is weird, can you tell us how to reproduce it?
> -- Mirco
> On Aug 16, 2012, at 1:09 PM, sschaef wrote:
>> After some edits to code completion I got the following exception after running core inside of eclipse to test the changes:
>> 2012-08-16 12:49:27,791 DEBUG [main] - System.out - java.lang.NoSuchFieldError: block$3
>> at scala.tools.eclipse.ui.ScalaCompletionProposal.apply(ScalaCompletionProposa l.scala:107)
>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal (CompletionProposalPopup.java:933)
>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelected ProposalWithMask(CompletionProposalPopup.java:881)
>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(Comp letionProposalPopup.java:1307)
>> at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.veri fyKey(ContentAssistant.java:807)
>> ...
>> It looks like binary incompatibility. Interestingly all works fine after a clean and rebuild of the project, but with each new change it is broken again. How can that be?
> After compiling I started core (in Run or Debug mode; it doesn't matter) and tried to do some code completion. After choosing one of the methods, suggested by the completion pop-up, the exception occurs when control flow arrives at the changed foreach block.
The linked EditorHelpers is used only by refactoring, and it shouldn't be triggered during code completion, so how is the change in EditorHelpers relevant?
> On Sa 18 Aug 2012 19:33:07 CEST, Mirco Dotta wrote:
>> Hey Simon,
>> That is weird, can you tell us how to reproduce it?
>> -- Mirco
>> On Aug 16, 2012, at 1:09 PM, sschaef wrote:
>>> After some edits to code completion I got the following exception after running core inside of eclipse to test the changes:
>>> 2012-08-16 12:49:27,791 DEBUG [main] - System.out - java.lang.NoSuchFieldError: block$3
>>> at scala.tools.eclipse.ui.ScalaCompletionProposal.apply(ScalaCompletionProposa l.scala:107)
>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal (CompletionProposalPopup.java:933)
>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelected ProposalWithMask(CompletionProposalPopup.java:881)
>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(Comp letionProposalPopup.java:1307)
>>> at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.veri fyKey(ContentAssistant.java:807)
>>> ...
>>> It looks like binary incompatibility. Interestingly all works fine after a clean and rebuild of the project, but with each new change it is broken again. How can that be?
It is irrelevant. The only thing which should be achieved is a recompile.
>> After compiling I started core (in Run or Debug mode; it doesn't matter) and tried to do some code completion. After choosing one of the methods, suggested by the completion pop-up, the exception occurs when control flow arrives at the changed foreach block.
> The linked EditorHelpers is used only by refactoring, and it shouldn't be triggered during code completion, so how is the change in EditorHelpers relevant?
The error occurs after code completion (I think). Debugger said me that code completion is used to construct the items which can be completed and refactoring to insert this items into the sources (the error occurs not while constructing the list of items to complete, but while trying to execute one specific completion).
>> On Sa 18 Aug 2012 19:33:07 CEST, Mirco Dotta wrote:
>>> Hey Simon,
>>> That is weird, can you tell us how to reproduce it?
>>> -- Mirco
>>> On Aug 16, 2012, at 1:09 PM, sschaef wrote:
>>>> After some edits to code completion I got the following exception after running core inside of eclipse to test the changes:
>>>> 2012-08-16 12:49:27,791 DEBUG [main] - System.out - java.lang.NoSuchFieldError: block$3
>>>> at scala.tools.eclipse.ui.ScalaCompletionProposal.apply(ScalaCompletionProposa l.scala:107)
>>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal (CompletionProposalPopup.java:933)
>>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelected ProposalWithMask(CompletionProposalPopup.java:881)
>>>> at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(Comp letionProposalPopup.java:1307)
>>>> at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.veri fyKey(ContentAssistant.java:807)
>>>> ...
>>>> It looks like binary incompatibility. Interestingly all works fine after a clean and rebuild of the project, but with each new change it is broken again. How can that be?
> After compiling I started core (in Run or Debug mode; it doesn't matter)
> and tried to do some code completion. After choosing one of the methods,
> suggested by the completion pop-up, the exception occurs when control flow
> arrives at the changed foreach block.
Are you using -optimize? Are you using Scala 2.9 or 2.10? If you're using
the optimizer, it might be that some method in EditorHelpers is inlined at
the call site, including the access to that field. After recompiling
EditorHelpers, that field may have been renamed (looks synthetic anyway),
but de call-site is not recompiled (since the incremental compiler only
recompiles calling code if *signatures* change -- meaning it's not
-optimize proof).
> On Sa 18 Aug 2012 19:33:07 CEST, Mirco Dotta wrote:
>> Hey Simon,
>> That is weird, can you tell us how to reproduce it?
>> -- Mirco
>> On Aug 16, 2012, at 1:09 PM, sschaef wrote:
>> After some edits to code completion I got the following exception after
>>> running core inside of eclipse to test the changes:
>>> 2012-08-16 12:49:27,791 DEBUG [main] - System.out -
>>> java.lang.NoSuchFieldError: block$3
>>> at scala.tools.eclipse.ui.**ScalaCompletionProposal.apply(**
>>> ScalaCompletionProposal.scala:**107)
>>> at org.eclipse.jface.text.**contentassist.**
>>> CompletionProposalPopup.**insertProposal(**CompletionProposalPopup.java:
>>> **933)
>>> at org.eclipse.jface.text.**contentassist.**
>>> CompletionProposalPopup.**insertSelectedProposalWithMask**
>>> (CompletionProposalPopup.java:**881)
>>> at org.eclipse.jface.text.**contentassist.**
>>> CompletionProposalPopup.**verifyKey(**CompletionProposalPopup.java:**
>>> 1307)
>>> at org.eclipse.jface.text.**contentassist.**ContentAssistant$**
>>> InternalListener.verifyKey(**ContentAssistant.java:807)
>>> ...
>>> It looks like binary incompatibility. Interestingly all works fine after
>>> a clean and rebuild of the project, but with each new change it is broken
>>> again. How can that be?
-- « Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Thanks for the help, Iulian. After deactivating -optimise the exception is gone and the code change can be succesfuly used.
I think this issue should be go into the FAQ or at least somewhere else in the documentation, shouldn't it?
On Di 21 Aug 2012 14:23:03 CEST, iulian dragos wrote:
> After compiling I started core (in Run or Debug mode; it doesn't
> matter) and tried to do some code completion. After choosing one
> of the methods, suggested by the completion pop-up, the exception
> occurs when control flow arrives at the changed foreach block.
> Are you using -optimize? Are you using Scala 2.9 or 2.10? If you're
> using the optimizer, it might be that some method in EditorHelpers is
> inlined at the call site, including the access to that field. After
> recompiling EditorHelpers, that field may have been renamed (looks
> synthetic anyway), but de call-site is not recompiled (since the
> incremental compiler only recompiles calling code if *signatures*
> change -- meaning it's not -optimize proof).
> iulian
> On Sa 18 Aug 2012 19:33:07 CEST, Mirco Dotta wrote:
> Hey Simon,
> That is weird, can you tell us how to reproduce it?
> -- Mirco
> On Aug 16, 2012, at 1:09 PM, sschaef wrote:
> After some edits to code completion I got the following
> exception after running core inside of eclipse to test the
> changes:
> 2012-08-16 12:49:27,791 DEBUG [main] - System.out -
> java.lang.NoSuchFieldError: block$3
> at
> scala.tools.eclipse.ui.__ScalaCompletionProposal.apply(__ScalaCompletionPro posal.scala:__107)
> at
> org.eclipse.jface.text.__contentassist.__CompletionProposalPopup.__insertPr oposal(__CompletionProposalPopup.java:__933)
> at
> org.eclipse.jface.text.__contentassist.__CompletionProposalPopup.__insertSe lectedProposalWithMask__(CompletionProposalPopup.java:__881)
> at
> org.eclipse.jface.text.__contentassist.__CompletionProposalPopup.__verifyKe y(__CompletionProposalPopup.java:__1307)
> at
> org.eclipse.jface.text.__contentassist.__ContentAssistant$__InternalListene r.verifyKey(__ContentAssistant.java:807)
> ...
> It looks like binary incompatibility. Interestingly all
> works fine after a clean and rebuild of the project, but
> with each new change it is broken again. How can that be?
> --
> « Je déteste la montagne, ça cache le paysage »
> Alphonse Allais