Search code examples
xtextxtend

Compilation error : Changing Depricated @Data in package "org.eclipse.xtend.lib" to "org.eclipse.xtend.lib.annotations.Data" - Xtend 2.7.2


I migrated xtext from 2.6.0 to 2.7.2 . After migration we had compilation errors related to @Data in package org.eclipse.xtend.lib . This annotation was depreciated and it was pointing to new annotations from 'org.eclipse.xtend.lib.annotations.Data' . But still its not compiling

Below is the trace for the same .

Error during annotation processing:
java.lang.NoSuchMethodError:
org.eclipse.xtend.lib.macro.TransformationContext.isThePrimaryGeneratedJavaElement(Lorg/eclipse/xtend/lib/macro/declaration/Element;)Z
org.eclipse.xtend.lib.annotations.DataProcessor$Util$1.apply(DataProcessor.java:64)
org.eclipse.xtend.lib.annotations.DataProcessor$Util$1.apply(DataProcessor.java:1)
org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:40)
com.google.common.collect.Iterators$7.computeNext(Iterators.java:702)
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:398)
org.eclipse.xtend.lib.annotations.DataProcessor.doTransform(DataProcessor.java:97)
org.eclipse.xtend.lib.macro.AbstractClassProcessor.doTransform(AbstractClassProcessor.java:42)

Regards Srinivas


Solution

  • add org.eclipse.xtend.lib to classpath!