sbt / sbt

sbt, the interactive build tool
https://scala-sbt.org
Apache License 2.0
4.81k stars 937 forks source link

Error while importing SBT project #4149

Closed ramanmishra closed 6 years ago

ramanmishra commented 6 years ago

steps

I created a new scala sbt project using intellij IDE. with scala version 2.12.6 and sbt version 1.1.4

if i down grade my sbt version to 0.13.16 and 0.13.17 it works fine

problem

Getting the following error.

Error:Error while importing SBT project:<br/>...<br/><pre>[error]   at sbt.io.Using.apply(Using.scala:22)
[error]     at sbt.MainLoop$.runWithNewLog(MainLoop.scala:102)
[error]     at sbt.MainLoop$.runAndClearLast(MainLoop.scala:58)
[error]     at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:43)
[error]     at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error]     at sbt.StandardMain$.runManaged(Main.scala:113)
[error]     at sbt.xMain.run(Main.scala:76)
[error]     at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]     at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]     at xsbt.boot.Launch$.run(Launch.scala:109)
[error]     at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]     at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]     at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]     at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error]     at xsbt.boot.Boot$.main(Boot.scala:17)
[error]     at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0

expectation

Project should build fine.

notes

sbt version: 1.1.4

eed3si9n commented 6 years ago

@ramanmishra Thanks for the report.

  1. Could you share what's in your build.sbt so we can reproduce it?
  2. What are the versions of IntelliJ IDEA and IntelliJ Scala plugin that you are using?

/cc @jastice

jastice commented 6 years ago

This looks like an older version of IntelliJ is being used. To import sbt 1.x at least version 2017.2 of IntelliJ Scala plugin is required. I recommend upgrading to 2018.1.

ramanmishra commented 6 years ago

intellij version 2017.2.2 scala plugin version 2017.2.11 and sbt 1.1.4 scala version 2.12.6 i have also tried it on intellij 2018.1 but it still gives the same error.

jastice commented 6 years ago

Please upgrade to 2018.1 or at least 2017.2.11, the earlier 2017.2 versions have some issues

ramanmishra commented 6 years ago

Ok i will do that and let you know if it solved the problem. thank you

ramanmishra commented 6 years ago

it solved the problem we can close the issue thank you!!. If you don't mind i would like to know what was the issue with the previous version? why it was not working fine with it can you please tell me.

jastice commented 6 years ago

The support for sbt 1.0 was not finalized for the initial release code freeze of 2017.2 so the necessary supporting files weren't included yet.

eed3si9n commented 6 years ago

Thanks @jastice for jumping in and helping @ramanmishra