orrsella / sbt-sublime

An sbt plugin for generating Sublime Text projects with library dependencies sources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing libraries in External Libraries when running gen-sublime twice

fedragon opened this issue · comments

If I run gen-sublime twice, it only shows one of my dependencies in External Libraries. Manually deleting External Libraries and running again gen-sublime fixes the issue.

Steps to reproduce the issue:

  1. Make sure External Libraries does not exist;
  2. Run gen-sublime: all the dependencies are listed in External Libraries;
  3. Run gen-sublime a second time: only one dependency is listed;
  4. Manually delete External Libraries;
  5. Run gen-sublime: all dependencies are listed again.

Seems to work fine for me on my https://github.com/orrsella/scala-template project.

Can you please add the output from sbt when running the tasks? Also, which version of sbt-sublime are you using?

Hello, thanks for replying!
I just confirmed that your plugin indeed works correctly, the folders are created but Sublime does not show them until I manually do Project -> Refresh Folders.

I'm using version 1.0.9, here is the sbt output, in case you still want to have a look:

[info] Generating Sublime project for root directory: /home/fedragon/Workspace/sparking
[info] Getting dependency libraries sources transitively: false
[info] Saving external sources to: /home/fedragon/Workspace/sparking/target/External Libraries
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  [FAILED     ] com.typesafe.sbteclipse#sbteclipse-plugin;2.4.0!sbteclipse-plugin.jar(src):  (0ms)
[warn] ==== local: tried
[warn]   /home/fedragon/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.10/sbt_0.13/2.4.0/srcs/sbteclipse-plugin-sources.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.10_0.13/2.4.0/sbteclipse-plugin-2.4.0-sources.jar
[warn]  [FAILED     ] com.typesafe.sbteclipse#sbteclipse-core;2.4.0!sbteclipse-core.jar(src):  (0ms)
[warn] ==== local: tried
[warn]   /home/fedragon/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-core/scala_2.10/sbt_0.13/2.4.0/srcs/sbteclipse-core-sources.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-core_2.10_0.13/2.4.0/sbteclipse-core-2.4.0-sources.jar
[warn]  [FAILED     ] org.apache.hadoop#hadoop-client;1.0.4!hadoop-client.jar(doc):  (0ms)
[warn] ==== local: tried
[warn]   /home/fedragon/.ivy2/local/org.apache.hadoop/hadoop-client/1.0.4/docs/hadoop-client-javadoc.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-client/1.0.4/hadoop-client-1.0.4-javadoc.jar
[warn]  [FAILED     ] org.apache.hadoop#hadoop-core;1.0.4!hadoop-core.jar(doc):  (0ms)
[warn] ==== local: tried
[warn]   /home/fedragon/.ivy2/local/org.apache.hadoop/hadoop-core/1.0.4/docs/hadoop-core-javadoc.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-core/1.0.4/hadoop-core-1.0.4-javadoc.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;2.4.0!sbteclipse-plugin.jar(src)
[warn]  :: com.typesafe.sbteclipse#sbteclipse-core;2.4.0!sbteclipse-core.jar(src)
[warn]  :: org.apache.hadoop#hadoop-client;1.0.4!hadoop-client.jar(doc)
[warn]  :: org.apache.hadoop#hadoop-core;1.0.4!hadoop-core.jar(doc)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info] Adding the following to external libraries:
[info]   scala-library-2.10.3-sources.jar
[info]   sbt-sublime-1.0.9-sources.jar
[info]   joda-time-2.3-sources.jar
[info]   joda-convert-1.2-sources.jar
[info]   spark-core_2.10-0.9.0-incubating-sources.jar
[info]   job-server-sources.jar
[info]   scalatest_2.10-2.0-sources.jar
[info]   junit-4.10-sources.jar
[info] Extracting jars to external sources directory
[info] Marking all files in sources directory as read-only
[info] Writing project to file: /home/fedragon/Workspace/sparking/sparking.sublime-project

Once again, this seems to work fine for me. As I tried earlier with my template, I see the External Libraries folder updated every time.

Can you maybe give it a try with my template/another sbt project to rule out a problem with the specific build you have?

Also, why is sbt-sublime one of your dependencies (being added to External Libraries)? Usually plugins, that are global/defined in project/plugins.sbt, aren't added as source dependencies. (For example, in my template I only get:

[info] Adding the following to external libraries:
[info]   scala-library-2.11.0-sources.jar
[info]   logback-classic-1.1.2-sources.jar
[info]   specs2_2.11-2.3.11-sources.jar

added as dependencies).

Hello,
using your scala-template project everything works fine (and indeed I don't see sbt-sublime as a source dependency): using my own project(s), I see the issue (and I have sbt-sublime as a source dependency).
I tried a couple of things:

  • defining sbt-sublime in the global build.sbt vs in project/plugins.sbt,
  • testing with another project of mine,

but I still see dependencies disappear from External Libraries folder (though they are there and I can see them again if I Refresh Folders) and sbt-sublime inside the folder.

On the other hand, your project works fine so I think we can close this issue, there has to be something in my build (although I can't say what).

If you want, you can send me your build definition to take a look and try to figure out what's the difference or if something is configured wrong (assuming you don't have anything private in there).

On Apr 30, 2014, at 19:27, Federico Ragona notifications@github.com wrote:

Hello,
using your scala-template project everything works fine (and indeed I don't see sbt-sublime as a source dependency): using my own project(s), I see the issue (and I have sbt-sublime as a source dependency).
I tried a couple of things:

defining sbt-sublime in the global build.sbt vs in project/plugins.sbt,
testing with another project of mine,
but I still see dependencies disappear from External Libraries folder (though they are there and I can see them again if I Refresh Folders) and sbt-sublime inside the folder.

On the other hand, your project works fine so I think we can close this issue, there has to be something in my build (although I can't say what).


Reply to this email directly or view it on GitHub.

That would be great, thank you very much!