Can't build plugin with EAP 92.91

I tried following the instructions in http://www.jetbrains.net/confluence/display/SCA/How+to+build+Scala+plugin+for+IntelliJ+IDEA+from+scratch to build a 2.8.0 compatible version of the plugin, but I'm unable to compile it. I'm using the latest Scala plugin from trunk (rev 77663575057...), EAP idea-IC-92.91 and scala-2.8.0.r19928-b20091129020233.

The error is:
   [scalac] Compiling 827 scala and 97 java source files to /home/rafaelf/idea/dev/scala-plugin/classes/production/Scala
   [scalac] /home/rafaelf/idea/dev/scala-plugin/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScStubElementType.scala:16: error: type arguments [S,T] do not conform to class IStubElementTypeWrapper's type parameter bounds [StubT <: com.intellij.psi.stubs.StubElement,PsiT <: com.intellij.psi.PsiElement]
   [scalac] extends IStubElementTypeWrapper[S, T](debugName) {
   [scalac]         ^
   [scalac] one error found

2 comments
Comment actions Permalink

This is fixed Scala-compiler bug. Please use scala-compiler bundled into our plugin (this is the best version for building our pluigin), or last nightly for scala-compiler.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Thanks.I was using the latest available nightly for the scala dist (as of yesterday, anyway). Maybe the wiki should mention the option of using the bundled compiler, it currently implies that one must obtain some Scala 2.8.0 build and edit the scala.properties file to point to it.

Anyway, I was able to build the plugin with a small change to a Java file:

diff --git a/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/wrappers/IStubElementTypeWrapper.java b/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/wrappers/IStubElementTypeWrapper.java
index 995efa7..f81c521 100644
--- a/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/wrappers/IStubElementTypeWrapper.java
+++ b/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/wrappers/IStubElementTypeWrapper.java
@@ -12,7 +12,7 @@ import java.io.IOException;
/**
  * @author ilyas
  */
-public abstract class IStubElementTypeWrapper<StubT extends StubElement, PsiT extends PsiElement> extends IStubElementType<StubT, PsiT> {
+public abstract class IStubElementTypeWrapper<StubT extends StubElement<PsiT>, PsiT extends PsiElement> extends IStubElementType<StubT, PsiT> {

   public IStubElementTypeWrapper(@NotNull String debugName) {
     super(debugName, ScalaFileType.SCALA_LANGUAGE);

0

Please sign in to leave a comment.