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

spray NoSuchMethodError when running gen-sublime

imedwei opened this issue · comments

Steps:

  1. reload plugin
  2. clean
  3. reload return
  4. gen-sublime

See:
java.lang.NoSuchMethodError: spray.json.DefaultJsonProtocol$.optionFormat(Lspray/json/JsonFormat;)Lspray/json/StandardFormats$OptionFormat;
http://pastebin.com/fRBDQe4c

  • Which versions of sbt-sublime and of sbt?
    $ sbt --version
    sbt launcher version 0.13.8
  • Does it happen for every project? Did you try with an empty project?
    Empty project works. Sublime-project successfully generated.
  • Did you try removing some of the dependencies you have and see if any particular one causes problems?
    I tried removing my own spray & sprayCan dependencies, but I still encounter the same error.
  • Do you have any of the configuration values available for sbt-sublime set to anything other than the defaults? If so, which values?
    No custom configuration values for sbt-sublime.

Thank you, Orr! If it works for me, sbt-sublime might boost my productivity lost to IntelliJ sbt slowness.

I suspect this happens because of a dependency clash of spray json between another plugin you're using and sbt-sublime (which requires version 1.3.1). Can you please run the following, and provide the output, so we can try to find it:

$ sbt

# show the loaded plugins
sbt> about

# enter the `plugins` (project) project
sbt> reload plugins

# show all dependency information
sbt> show dependency-classpath

Here you go! I see in the dependency-classpath a few references to a newer version of spray 1.3.2.

about
http://pastebin.com/cZQiWKGV

reload plugins

show dependency-classpath
http://pastebin.com/bfC47yc8

Thanks. I released a new version of the plugin with spray-json version 1.3.2. The new version is 1.1.1. Can you please test the new version with your project and let me know if it solves your problem?

I'm closing this. Please reopen and reply if you're still experiencing this issue.

Thanks Orr! The new version worked great.