Giter VIP home page Giter VIP logo

sbt-idea's People

Contributors

akisaarinen avatar alain-odea-vgh avatar alainodea avatar alambert avatar arashi01 avatar benjaminparker avatar christophercurrie avatar chwthewke avatar davidlar avatar heralight avatar ijuma avatar indrajitr avatar jroper avatar jrudolph avatar kasper-f avatar kxbmap avatar mdekstrand avatar mpeltonen avatar mprihoda avatar oluies avatar opyate avatar pzawistowski avatar retronym avatar scroyston avatar sheliaklyr avatar tackley avatar teigen avatar thedatabase avatar wsargent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-idea's Issues

Migration to Scala 2.8.x

Hi,

I've recently migrated my projects to Scala 2.8.0 but unfortunately the plugin doesn't appear to work with this version. Are there any plans to move to Scala 2.8.0 ?

If not any idea's what changes would be required to do this as I might have a go myself.

Thanks,

Paul.

documentation parentproject

for multiprojects, it looks like the ParentProject doesn't need the IdeaProject trait mixed in, as stated in the README.
doing so results in a completely broken config (using the current master of the project).

class MyProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject /* not needed */ {
}

Every run creates different files

So, far I found two problems where the plugins creates different idea metadata for each run. This instability leads to spurious reloads necessary and unclear diffs if the generated files are put under version control (even if this is not recommended usage).

As usual this comes from some information put into sets. I observed:

  1. Dependencies are spit out in varying order
  2. Dependencies are taken from different folders inside of lib_managed/scala_X/{provided, test, etc.}

Attaching sources to dependencies

Hi

What is the best way to attach sources to the Intellij dependencies? After I run the "idea" command there does seem to be a source path attached for each dependency, e.g.:
/Users/dev/scala/proj/lib_managed/scala_2.8.1/test/servlet-api-2.5.0.jar

Has source location:

/Users/dev/scala/proj/lib_managed/scala_2.8.1/test/servlet-api-2.5.0-sources.jar

Is it possible to tell sbt-idea to use a specific path format when it generates source attachment paths?

Alternatively is it possible to configure my sbt ivy retrieve pattern in such a way as to match the source locations generated by sbt-idea?

I am automatically retrieving the sources of my ivy.xml dependencies using sbt-sources(https://github.com/OlegYch/sbt-sources-plugin), so I would prefer to avoid copying source jars manually into the sbt-idea expected locations.

Thanks

Nullpointer exception

Did

  1. git clone git://github.com/ghostm/lift_sbt_prototype.git demo2
  2. followed instructions on this site
  3. got a nullpointer exception

Version information
[info] Building project Lift SBT Tempalte 0.1 against Scala 2.8.0
[info] using LiftProject with sbt 0.7.4 and Scala 2.7.7

Stacktrace after issuing idea command
java.lang.NullPointerException
at scala.xml.XML$.saveFull(XML.scala:138)
at scala.xml.XML$.save(XML.scala:103)
at scala.xml.XML$.save(XML.scala:93)
at SaveableXml$class.save(SaveableXml.scala:10)
at IdeaModuleDescriptor.save(IdeaModuleDescriptor.scala:5)
at IdeaProject$class.createIdeaProject(IdeaProject.scala:15)
at LiftProject$$anonfun$subProject$1$$anon$1.createIdeaProject(LiftProject.scala:12)
at IdeaProject$$anonfun$idea$1.apply(IdeaProject.scala:6)
at IdeaProject$$anonfun$idea$1.apply(IdeaProject.scala:6)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.sbt$impl$RunTask$$runIfNotRoot(RunTask.scala:60)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Control$.trapUnit(Control.scala:19)
at sbt.Distributor$Run$Worker.run(ParallelRunner.scala:131)

Create IntelliJ module for parent project.

This would be in line with the project structure that IntelliJ generates from a multi-module Maven build. Without this, I can't see files in subdirectories of the parent project that don't correspond to a sub-module. The parent project should not have dependencies attached, nor should it have the Scala facet.

Using sbt as processor fails due to missing dependency

Hi,

apparently the URL that is stated in the documentation isn't applicable anymore? Thanks for looking into this.

> *sbtIdeaRepo at http://mpeltonen.github.com/maven/    
[info] Defined new processor repository 'sbtIdeaRepo at http://mpeltonen.github.com/maven/'
> *idea is com.github.mpeltonen sbt-idea-processor 0.4.0
[warn]  module not found: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0
[warn] ==== local: tried
[warn]   /Users/alex/.ivy2/local/com.github.mpeltonen/sbt-idea-processor_2.8.1/0.4.0/ivys/ivy.xml
[warn]   -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]   /Users/alex/.ivy2/local/com.github.mpeltonen/sbt-idea-processor_2.8.1/0.4.0/jars/sbt-idea-processor_2.8.1.jar
[warn] ==== sbtIdeaRepo: tried
[warn]   http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]   -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]   http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]   -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]   http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn]   http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]   -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]   http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info] 
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn]      module not found: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0
[warn]  ==== local: tried
[warn]    /Users/alex/.ivy2/local/com.github.mpeltonen/sbt-idea-processor_2.8.1/0.4.0/ivys/ivy.xml
[warn]    -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]    /Users/alex/.ivy2/local/com.github.mpeltonen/sbt-idea-processor_2.8.1/0.4.0/jars/sbt-idea-processor_2.8.1.jar
[warn]  ==== sbtIdeaRepo: tried
[warn]    http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]    -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]    http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn]  ==== public: tried
[warn]    http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]    -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]    http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn]  ==== Scala-Tools Maven2 Repository: tried
[warn]    http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.pom
[warn]    -- artifact com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0!sbt-idea-processor_2.8.1.jar:
[warn]    http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea-processor_2.8.1/0.4.0/sbt-idea-processor_2.8.1-0.4.0.jar
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[warn]      ::          UNRESOLVED DEPENDENCIES         ::
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[warn]      :: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0: not found
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[info] 
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:130)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:112)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:110)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:93)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:93)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:85)
    at sbt.IvySbt.liftedTree1$1(Ivy.scala:41)
    at sbt.IvySbt.action$1(Ivy.scala:41)
    at sbt.IvySbt$$anon$1.call(Ivy.scala:50)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
    at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
    at xsbt.boot.Locks$.apply(Locks.scala:31)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:50)
    at sbt.IvySbt.withIvy(Ivy.scala:82)
    at sbt.IvySbt$Module.withModule(Ivy.scala:93)
    at sbt.IvyActions$.update(IvyActions.scala:110)
    at sbt.processor.Retrieve$$anonfun$retrieve$1.apply(Retrieve.scala:21)
    at sbt.processor.Retrieve$$anonfun$retrieve$1.apply(Retrieve.scala:21)
    at sbt.processor.Callable$$anon$1.call(Retrieve.scala:31)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
    at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
    at xsbt.boot.Locks$.apply(Locks.scala:31)
    at sbt.processor.Retrieve.retrieve(Retrieve.scala:21)
    at sbt.processor.ManagerImpl.sbt$processor$ManagerImpl$$retrieveProcessor(Manager.scala:61)
    at sbt.processor.ManagerImpl.defineProcessor(Manager.scala:40)
    at sbt.processor.Execute.apply(Execute.scala:16)
    at sbt.processor.CommandRunner.apply(CommandRunner.scala:13)
    at sbt.xMain$$anonfun$process$1$6.apply(Main.scala:242)
    at sbt.xMain$$anonfun$process$1$6.apply(Main.scala:241)
    at sbt.xMain.tryOrFail$1(Main.scala:146)
    at sbt.xMain.process$1(Main.scala:241)
    at sbt.xMain$Continue$1.apply(Main.scala:132)
    at sbt.xMain.run$1(Main.scala:136)
    at sbt.xMain.processArguments(Main.scala:266)
    at sbt.xMain.startProject(Main.scala:107)
    at sbt.xMain.run(Main.scala:84)
    at sbt.xMain.run0$1(Main.scala:35)
    at sbt.xMain.run(Main.scala:42)
    at xsbt.boot.Launch$.run(Launch.scala:53)
    at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
    at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
    at xsbt.boot.Launch$.launch(Launch.scala:57)
    at xsbt.boot.Launch$.explicit(Launch.scala:42)
    at xsbt.boot.Launch$.initialized(Launch.scala:38)
    at xsbt.boot.Launch$.parsed(Launch.scala:31)
    at xsbt.boot.Launch$.configured(Launch.scala:21)
    at xsbt.boot.Launch$.apply(Launch.scala:16)
    at xsbt.boot.Launch$.apply(Launch.scala:13)
    at xsbt.boot.Boot$.runImpl(Boot.scala:24)
    at xsbt.boot.Boot$.run(Boot.scala:19)
    at xsbt.boot.Boot$.main(Boot.scala:15)
    at xsbt.boot.Boot.main(Boot.scala)
[error] sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea-processor_2.8.1;0.4.0: not found

stackoverflow on creating idea files

Hello, I've got a SBT project which has created idea files previously, but when I've updated and re-run I'm getting this error:

Any ideas?

java.lang.StackOverflowError
at scala.collection.mutable.HashTable$class.elemHashCode(HashTable.scala:154)
at scala.collection.mutable.HashMap.elemHashCode(HashMap.scala:33)
at scala.collection.mutable.HashTable$class.findEntry(HashTable.scala:66)
at scala.collection.mutable.HashMap.findEntry(HashMap.scala:33)
at scala.collection.mutable.HashMap.findEntry(HashMap.scala:33)
at scala.collection.mutable.DefaultMapModel$class.update(DefaultMapModel.scala:38)
at scala.collection.mutable.HashMap.update(HashMap.scala:33)
at sbt.Reflective$$anonfun$reflectiveMappings$1.apply(BasicProjectTypes.scala:574)
at sbt.Reflective$$anonfun$reflectiveMappings$1.apply(BasicProjectTypes.scala:573)
at scala.collection.mutable.OpenHashMap$$anonfun$foreach$1.apply(OpenHashMap.scala:197)
at scala.collection.mutable.OpenHashMap$$anonfun$foreach$1.apply(OpenHashMap.scala:195)
at scala.collection.mutable.OpenHashMap$$anonfun$foreachUndeletedEntry$1.apply(OpenHashMap.scala:202)
at scala.collection.mutable.OpenHashMap$$anonfun$foreachUndeletedEntry$1.apply(OpenHashMap.scala:202)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.runtime.BoxedArray$AnyIterator.foreach(BoxedArray.scala:45)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24)
at scala.collection.mutable.OpenHashMap.foreachUndeletedEntry(OpenHashMap.scala:202)
at scala.collection.mutable.OpenHashMap.foreach(OpenHashMap.scala:195)
at sbt.Reflective$.reflectiveMappings(BasicProjectTypes.scala:573)
at sbt.ReflectiveModules$class.reflectiveModuleMappings(BasicProjectTypes.scala:551)
at sbt.BasicScalaProject.reflectiveModuleMappings(DefaultProject.scala:21)
at sbt.ReflectiveModules$class.subProjects(BasicProjectTypes.scala:550)
at sbt.BasicScalaProject.subProjects(DefaultProject.scala:21)
at IdeaProcessor.attemptIdeaProject(IdeaProcessor.scala:16)
at IdeaProcessor$$anonfun$attemptIdeaProject$1.apply(IdeaProcessor.scala:16)
at IdeaProcessor$$anonfun$attemptIdeaProject$1.apply(IdeaProcessor.scala:16)
at scala.Iterator$class.foreach(Iterator.scala:414)

then these lines repeat over and over.

at IdeaProcessor.attemptIdeaProject(IdeaProcessor.scala:16)
at IdeaProcessor$$anonfun$attemptIdeaProject$1.apply(IdeaProcessor.scala:16)
at IdeaProcessor$$anonfun$attemptIdeaProject$1.apply(IdeaProcessor.scala:16)
at scala.Iterator$class.foreach(Iterator.scala:414)

Compile output path incorrect in a cross build project

project.properties:

build.scala.versions=2.8.0 2.8.1

SBT Startup:

[info] Building project scalaz 5.1-SNAPSHOT against Scala 2.8.0

Compiler output path:

/Users/jason/code/scalaz/example/target/scala_2.8.0 2.8.1/classes

Expected:

/Users/jason/code/scalaz/example/target/scala_2.8.0/classes

Maven URL

I was unable to get the SBT processor to work using the repo URL in the README; instead I used

*sbtIdeaRaw at http://github.com/mpeltonen/mpeltonen.github.com/raw/master/maven

and everything worked fine. Probably user error, but thought you should know.

add rt.jar to idea's classpath

I'm trying to use an HttpURLConnection, but idea said it cannot recognize the symbol java when importing java.net.HttpURLConnection

Language Level defaults to 5.0

Now, I am not really an expert in IDEA, but the section that controls the Language Level of the project is in the *.ipr file.

component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK"
output url="file://$PROJECT_DIR$/out"
component

When you run sbt the 'idea' action it will by default set the languageLevel="JDK_1_5" in the IdeaProjectDescriptor class. I could be mistaken, but I think the default for SBT is to consider the java sources as 1.6 language level. If so, it would make sense that the default Language Level was JDK_1_6.

Or maybe there could be a setting/property to specify? As it is now, I have to update and reload the project from IDEA everytime I run the sbt idea action.

too aggressively setting transitive dependencies as "TEST"

I've got the following dependencies in my project:

val slf4j = "org.slf4j" % "slf4j-api" % "1.6.0"
val slf4jsimple = "org.slf4j" % "slf4j-simple" % "1.6.0" % "test"

slf4j-simple has a transitive dependency on slf4j-api.

When I export to idea, both of these dependencies are marked as TEST:

 <orderEntry type="module-library" exported=" " scope="TEST">
  <library>
    <CLASSES>
      <root url="jar://$MODULE_DIR$/lib_managed/scala_2.8.1/test/slf4j-api-1.6.0.jar!/"></root>
    </CLASSES>
    <JAVADOC>


    </JAVADOC>
    <SOURCES>

    </SOURCES>
  </library>
</orderEntry><orderEntry type="module-library" exported=" " scope="TEST">
  <library>
    <CLASSES>
      <root url="jar://$MODULE_DIR$/lib_managed/scala_2.8.1/test/slf4j-simple-1.6.0.jar!/"></root>
    </CLASSES>
    <JAVADOC>


    </JAVADOC>
    <SOURCES>

    </SOURCES>
  </library>
</orderEntry>

They should not be. slf4j-api is a normal compile dependency.

Incorrect info in README

Hi

current readme says...

class MyProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject

I think it should read...

class MyProject(info: ProjectInfo) extends ParentProject(info) with IdeaPlugin

JARs exported from modules should not be duplicated as dependency of dependent module

SBT doesn't really do this part correctly, see http://code.google.com/p/simple-build-tool/issues/detail?id=44

But the plugin could work around this by omitting jars as a direct dependency of module A, if that jar was exported by a module B, where A depends on B.

Alternatively, JAR dependencies could be marks as not 'exported' in the IntelliJ config.

Having the same jar repeated on the classpath leads to annoyances like this error with SLF4J:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/code/analytics/analytics-test-support/lib_managed/scala_2.8.1/compile/logback-classic-0.9.24.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/code/analytics/analytics-utils/lib_managed/scala_2.8.1/compile/logback-classic-0.9.24.jar!/org/slf4j/impl/StaticLoggerBinder.class]

Include resources and test-resources in classpath

sbt includes resources and test-resources (in target) in the classpath when running classes. The way this is usually modelled in Eclipse is to also include them as output directories. IDEA, however, seems to only support two output directories and those are needed for classes and test-classes.

The only approach I have found is to include resources and test-resources directories as dependencies. I have a patch locally and I'll push it to my repository soon for review.

Generate directory-based format instead of .ipr file

Directory-based format (.idea) is the default format as it makes it easier to share project settings among team members while using automated tools (like sbt-idea-plugin) to generate certain files. Randall Schulz brought this to my attention in the #scala IRC channel.

Don't create .idea/vcs.xml

To the best of my knowledge and understanding, SBT-IDEA has nothing to go on to create .idea/vcs.xml files and overwriting existing ones that may have been created or edited by IDEA is undesirable.

I would like to have this file not generated or altered by the plug-in.

Bug: IDEA library dependency not updated after a change on the SBT side

I just experienced this:
I updated the version my TestNG dependency in the SBT project definition. Additionally I added an "withSources".
Then I ran "sbt update" and "sbt idea" to also refresh the IDEA library setting. However, the plugin did not touch the existing TestNG library configuration in the IDEA module settings.
I had to manually remove the now invalid entry in the module dependencies and run "sbt idea" again for the plugin to really create a new (updated) TestNG dependency.
I'm assuming the current behavior is a bit too conservative... the plugin only checks whether there is already an IDEA library configured for a dependency, but does not check the versions (and additional info like "withSources" or "ideaDocUrl"...

add lib_managed/compile etc as library of project

when adding dependencies to my project in project/build/Foo.scala, the resolved dependencies are not added to the idea library and are therefore not found. Workaround is to just add the lib_managed/compile as a jar directory but would be good to have this automated

Compiler output directories contain wrong Scala version

I just used the processor to create IDEA project files for a multi module SBT project that is built against 2.8.0 only. But all the compiler output directories contain scala_2.8.0.RC3 in the path, e.g. /Users/hseeberger/projects/petag/petag-db/target/scala_2.8.0.RC3/classes.

Feature Request: Attach a Documentation URL to Dependencies

IDEA supports adding a Documentation URL to dependency libs, a great feature that allows you to move the cursor over any class or method and press Shift-F1 to open a browser at the corresponding API doc page.
So far this only works for Java classes/methods, for some reason the Scala plugin doesn't open attached ScalaDoc API pages (yet). Still, it'd be nice if it was possible to somehow attach a Doc URL to a dependency in the SBT project definition, which the plugin would then convert into the respective IDEA setting.
I'm missing this for example with joda-time (http://joda-time.sourceforge.net/api-release/index.html).

Library paths too aggressively filtered between dependent sub-projects

I have a multi-module project in which there is one project ("Library") that is depended upon by another project ("User"). "Library" depends on a third-party library for its tests, and "User" on the same library for everything. Rather like this:

import sbt._

class Simple(info: ProjectInfo) extends ParentProject(info) with IdeaProject {
  val slf4jVersion = "1.6.1"

  val libraryProject = project("library", "library", new Library(_))
  val userProject = project("user", "user", new User(_), libraryProject)

  class Library(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
    val slf4j = "org.slf4j" % "slf4j-api" % slf4jVersion % "test->default"
  }

  class User(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
    val slf4j = "org.slf4j" % "slf4j-api" % slf4jVersion
  }
}

The generated IML file for the User project does not contain the declared library as a dependency.

Catch parse error of misc.xml, report that it is not well formed

If misc.xml is invalid XML (typically because it contains merge markers) and I run 'idea', a SAXParseException is reported.

I suggest to catch exception and report an error with more context; and offer an option to blow away the existing file and recreate from scratch.

java.lang.UnsupportedOperationException: unsuitable as hash key

When running:
sbt idea

on:
sbt 0.7.3
scala 2.7.7
sbt-idea-plugin latest snapshot

produces:
java.lang.UnsupportedOperationException: unsuitable as hash key
at scala.collection.mutable.Buffer$class.hashCode(Buffer.scala:280)
at scala.collection.mutable.ArrayBuffer.hashCode(ArrayBuffer.scala:26)
at scala.xml.Utility$.hashCode(Utility.scala:263)
at scala.xml.Elem.hashCode(Elem.scala:64)
at scala.collection.mutable.FlatHashTable$class.elemHashCode(FlatHashTable.scala:144)
at scala.collection.immutable.HashSet.elemHashCode(HashSet.scala:39)
at scala.collection.mutable.FlatHashTable$class.containsEntry(FlatHashTable.scala:56)
at scala.collection.immutable.HashSet.containsEntry(HashSet.scala:39)
at scala.collection.immutable.HashSet.$plus(HashSet.scala:60)
at scala.collection.immutable.Set$$anonfun$$plus$plus$1.apply(Set.scala:73)
at scala.collection.immutable.Set$$anonfun$$plus$plus$1.apply(Set.scala:73)
at scala.Iterator$class.foldLeft(Iterator.scala:520)
at scala.runtime.BoxedArray$AnyIterator.foldLeft(BoxedArray.scala:45)
at scala.Iterable$class.foldLeft(Iterable.scala:321)
at scala.runtime.BoxedArray.foldLeft(BoxedArray.scala:24)
at scala.Iterable$class.$div$colon(Iterable.scala:338)
at scala.runtime.BoxedArray.$div$colon(BoxedArray.scala:24)
at scala.collection.immutable.Set$class.$plus$plus(Set.scala:73)
at scala.collection.immutable.HashSet.$plus$plus(HashSet.scala:39)
at scala.collection.immutable.HashSet$.apply(HashSet.scala:26)
at scala.collection.immutable.Set4.$plus(Set4.scala:31)
at scala.collection.immutable.Set$$anonfun$map$1.apply(Set.scala:167)
at scala.collection.immutable.Set$$anonfun$map$1.apply(Set.scala:167)
at scala.Iterator$class.foldLeft(Iterator.scala:520)
at scala.collection.mutable.ResizableArray$$anon$1.foldLeft(ResizableArray.scala:66)
at scala.Iterable$class.foldLeft(Iterable.scala:321)
at scala.collection.immutable.HashSet.foldLeft(HashSet.scala:39)
at scala.collection.immutable.Set$class.map(Set.scala:167)
at scala.collection.immutable.HashSet.map(HashSet.scala:39)
at IdeaModuleDescriptor.content(IdeaModuleDescriptor.scala:35)
at SaveableXml$class.save(SaveableXml.scala:10)
at IdeaModuleDescriptor.save(IdeaModuleDescriptor.scala:4)
at IdeaPlugin$class.createIdeaProject(IdeaPlugin.scala:11)
at LDSProject.createIdeaProject(LDSProject.scala:4)
at IdeaPlugin$$anonfun$idea$1.apply(IdeaPlugin.scala:4)
at IdeaPlugin$$anonfun$idea$1.apply(IdeaPlugin.scala:4)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.run(RunTask.scala:32)
at sbt.impl.RunTask$.apply(RunTask.scala:17)
at sbt.impl.RunTask$.apply(RunTask.scala:16)
at sbt.Project$class.run(Project.scala:98)
at sbt.Project$class.act(Project.scala:129)
at sbt.BasicScalaProject.act(DefaultProject.scala:21)
at LDSProject.act(LDSProject.scala:50001)
at sbt.xMain$$anonfun$8.apply(Main.scala:487)
at sbt.xMain$$anonfun$8.apply(Main.scala:487)
at sbt.xMain.withAction(Main.scala:520)
at sbt.xMain.sbt$xMain$$handleAction(Main.scala:487)
at sbt.xMain.handleCommand(Main.scala:477)
at sbt.xMain.processAction(Main.scala:418)
at sbt.xMain.process$1(Main.scala:238)
at sbt.xMain.processArguments(Main.scala:247)
at sbt.xMain.startProject(Main.scala:105)
at sbt.xMain.run(Main.scala:82)
at sbt.xMain.run0$1(Main.scala:33)
at sbt.xMain.run(Main.scala:40)
at xsbt.boot.Launch$.run(Launch.scala:51)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:40)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:40)
at xsbt.boot.Launch$.launch(Launch.scala:55)
at xsbt.boot.Launch$.explicit(Launch.scala:40)
at xsbt.boot.Launch$.initialized(Launch.scala:36)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)

Dependencies "withSources"

In sbt you can download dependency with source code via

val dep = "name" % "org" % "ver" withSources

It will be cool for plugin to pickup those sources to Idea.

License

I was looking at the source files and they don't seem to include a license. Has it been chosen yet? If not, I think it would be a good idea to do so as it's a requirement for many companies.

Align IDEA and SBT output paths

SBT uses target/... as output paths. The defaults in IDEA are different, e.g. out/production/...
The plugin should change the IDEA settings for the project to point to target and the modules to point to /target//classes and /target//test-classes

Problems and Feature requests

I updated this plugin to the latest version and found it's very good crafted and useful.
Find some minor problems:

  1. The scroll bar didn't go with the output window. when the output log is huge, I have to manually drag the scroll bar, can't keep an eye on the windows easily.
  2. little feature request: color output, especially mark [ERROR] to red text.

Plugin "publish-local" fails with an error

Cloning the plugin-repo and running "sbt publish-local" fails with the following error:

[error] Error running deliver-local: sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea-core_2.7.7;0.1-SNAPSHOT: java.text.ParseException: [unknown tag project in file:/Users/mathias/.ivy2/cache/com.github.mpeltonen/sbt-idea-core_2.7.7/ivy-0.1-SNAPSHOT.xml.original

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.