Developing a plugin using the sbt plugin -- sandbox cache problem

hi,

i am developing an IDEA plugin written in Scala, and i want to use the sbt plugin to compile. I kind of got it going, but there is a caching problem.

my run configuration is as follows:

    <configuration default="false" name="ScalaColliderIDEA" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="ScalaColliderIDEA" />
      <option name="VM_PARAMETERS" value="" />
      <option name="PROGRAM_PARAMETERS" value="" />
      <log_file path="$USER_HOME$/Library/Caches/IntelliJIdea10CE/plugins-sandbox/system/log/idea.log" checked="false" skipped="true" show_all="false" alias="IDEA LOG" />
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Run" />
      <method>
        <option name="BuildArtifacts" enabled="true" />
        <option name="Make" enabled="false" />
        <option name="SBT.BeforeRunTask" enabled="true" action="test-compile" />
      </method>
    </configuration>


now this builds fine _once_. but then when i edit a source file, and re-launch the sandbox, although sbt runs "test-compile" still the old class files are used. the only workaround i found is to edit the run another configuration with "build artefacts" unchecked:

    <configuration default="false" name="wipe" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="ScalaColliderIDEA" />
      <option name="VM_PARAMETERS" value="" />
      <option name="PROGRAM_PARAMETERS" value="" />
      <log_file path="$USER_HOME$/Library/Caches/IntelliJIdea10CE/plugins-sandbox/system/log/idea.log" checked="false" skipped="true" show_all="false" alias="IDEA LOG" />
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Run" />
      <method>
        <option name="Make" enabled="false" />
        <option name="SBT.BeforeRunTask" enabled="true" action="test-compile" />
      </method>
    </configuration>


and _then_, run again the original configuration with "build artefacts" enabled.

obviously this completely undoes the performance advantage of running sbt instead of idea's compiler.

so i guess there is a little file somewhere that i need to delete before a run, to get the indended behavior?

thanks, -sciss-

Please sign in to leave a comment.