Reputation: 446
When creating a new Scala project in IntelliJ using sbt 1.4.2 and Scala 2.13.3 I keep seeing sbt: extracting project structure from sbt
going on forever (multiple hours). This is very weird, as I've just done a clean installation of the latest version of InteliJ but also on my previous computer as well as laptop this same issue seems to be present.
When canceling this task all it says is "Extracting SBT structure failed" with no further debug information. I've attached a picture of the information I do get until the point it gets stuck. Interestingly enough, when compiling and running from the sbt shell, the program works.
Any ideas?
Upvotes: 12
Views: 5171
Reputation: 34403
This is a known incompatibility between IntelliJ and SBT 1.4.2:
IntelliJ issue Project creation with sbt=1.4.2 takes forever SCL-18393
SBT PR Only create console terminal if process has console #6051
Intellij import was broken in sbt 1.4.2 because we increased the scenarios in which virtual io is used.
As mentioned in the SBT issue, this is already fixed on SBT side. The fix should be now available in the release 1.4.3:
Fixes IntelliJ import on Windows #6051 by @eatkins
As a workaround use any sbt version other than 1.4.2, use sbt from command line or you can try using SBT shell for both imports and builds as advised by mszleper in his answer.
Upvotes: 3
Reputation: 41
Work for me after change sbt settings in IntelliJ - enable using sbt shell for project reload and builds
Upvotes: 4
Reputation: 11
I had the same issue with IntelliJ IDEA 2020.2.3 community edition and a project set to use sbt version 1.4.2. Using an earlier version of sbt is working for me.
It worked successfully with sbt version 1.3.4
, 1.3.13
, or 1.4.1
in build.properties
, so it appears to be an issue between IntelliJ and sbt 1.4.2
.
Upvotes: 0
Reputation: 1
Couldn't find a fix using the same sbt and scala versions. Rolling back to sbt-version 1.3.9 and scalaVersion 2.12.12 fixed it for me.
Upvotes: 0