sbt-structure - develop and debug flow

Hello!

I would like to create some fixes for sbt-structure ( https://github.com/JetBrains/sbt-structure ) when importing sbt project, but I don't know how to setup good developing / debugging work flow. I can publish plugin locally and copy it to <intellij config directory>/config/plugins/Scala/launcher/ but I would like to know if there's more developer friendly solution.

Thank you.

5 comments
Comment actions Permalink
Official comment

You don't need to manually copy it.

Simply change sbtStructureVersion = "5.1.2" inside project/dependencies.scala to whatever version you've set in respective build file of sbt-structure and build the scala plugin.

Comment actions Permalink

Thank you Mikhail for the answer. I know I don't need to copy it, so I got idea to try importing intellij-scala plugin into second window setup some remote debugging. Unfortunately when I import intellij-scala plugin as explained in docs on github https://github.com/JetBrains/intellij-scala  set SDK to idea plugin SDK but on compile time  I got compilation errors with explicints: 

 

Error:(75, 24) object Codec is not a member of package io
StringBytesPair(io.Codec.fromUTF8(chunk).mkString, chunk)
^
Error:(230, 16) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
printType(classType)
^
Error:(230, 16) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
printType(classType)
^
Error:(235, 73) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case Some(t: Type) => print("\n"); print(" this : " + toString(t) + " =>")
^
Error:(235, 73) not enough arguments for method toString: (implicit flags: ScalaSigPrinter.this.TypeFlags)String.
Unspecified value parameter flags.
case Some(t: Type) => print("\n"); print(" this : " + toString(t) + " =>")
^
Error:(285, 14) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
printType(classSymbol)
^
Error:(285, 14) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
printType(classSymbol)
^
Error:(297, 14) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
printType(classSymbol)
^
Error:(297, 14) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
printType(classSymbol)
^
Error:(359, 20) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
printType(x)
^
Error:(359, 20) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
printType(x)
^
Error:(377, 40) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case x => print(" : "); printType(x)
^
Error:(377, 40) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
case x => print(" : "); printType(x)
^
Error:(427, 51) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case PolyType(typeRef, symbols) => printType(PolyTypeWithCons(typeRef, symbols, " = "))
^
Error:(427, 51) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
case PolyType(typeRef, symbols) => printType(PolyTypeWithCons(typeRef, symbols, " = "))
^
Error:(428, 27) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case tp => printType(tp, " = ")
^
Error:(428, 27) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
case tp => printType(tp, " = ")
^
Error:(438, 51) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case PolyType(typeRef, symbols) => printType(PolyTypeWithCons(typeRef, symbols, ""))
^
Error:(438, 51) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
case PolyType(typeRef, symbols) => printType(PolyTypeWithCons(typeRef, symbols, ""))
^
Error:(439, 26) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case _ => printType(t.infoType)
^
Error:(439, 26) not enough arguments for method printType: (implicit flags: ScalaSigPrinter.this.TypeFlags)Unit.
Unspecified value parameter flags.
case _ => printType(t.infoType)
^
Error:(446, 27) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
buffer.append(toString(attrib.typeRef, "@"))
^
Error:(446, 27) not enough arguments for method toString: (implicit flags: ScalaSigPrinter.this.TypeFlags)String.
Unspecified value parameter flags.
buffer.append(toString(attrib.typeRef, "@"))
^
Error:(466, 50) could not find implicit value for parameter flags: ScalaSigPrinter.this.TypeFlags
case t: Type => "classOf[%s]" format toString(t)
^
Error:(466, 50) not enough arguments for method toString: (implicit flags: ScalaSigPrinter.this.TypeFlags)String.
Unspecified value parameter flags.
case t: Type => "classOf[%s]" format toString(t)
^

 

the version of Intellij which I'm using is: 

 

IntelliJ IDEA 2016.1.2
Build #IC-145.972, built on May 14, 2016
JRE: 1.8.0_76-release-b162 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

 

Any tips how to setup this plugin? 

 

Thank you

0
Comment actions Permalink

Please share .idea directory of the imported project. There is something wrong with configuration.

0
Comment actions Permalink

Thank you for quick answer. Here's attached .idea directory

 

https://drive.google.com/open?id=0B_YtUG54omUBVktMTk9kdlJhMXc

 

 

0
Comment actions Permalink

Hello again,

I managed intellij-plugin to work - removed all intellij caches, removed plugin sources and tried again with tutorial.

 

Now it works. If I will stuck with something different I will ask again. Thank you!

0

Please sign in to leave a comment.