Intellij 2018.3.1无法从SBT项目中转储项目结构

时间:2018-12-18 11:35:12

标签: scala intellij-idea sbt intellij-idea-2018

从2018.2更新到Intellij Ultimate 2018.3,使我的一个项目在SBT下的项目同步中断。

这取决于build.sbt

中的另一个git repo
val commonScheme = "git+ssh://git@"
lazy val commonsGit =
      ProjectRef(uri(s"${commonScheme}github.com/common-project.git#branch"), "commons")        
lazy val root =  Project("root", file("."))
  .dependsOn(commonsGit)

在项目导入期间,Intellij可以转储项目结构,但无法导入Intellij项目模型,并出现以下错误:URI scheme is not "file"

intellij fails to import to project model


这是项目构建控制台的输出:

;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers" ;*/*:dumpStructureTo /private/var/folders/fh/63rcbt095332gl82cg0zv_p00000gn/T/sbt-structure.xml; session clear-all
[info] Loading global plugins from /Users/me/.sbt/0.13/plugins
[info] Loading project definition from /Users/me/dev/base-project/project
[info] Loading project definition from /Users/me/.sbt/0.13/staging/0f1bc3a71daf6972d134/ak-spark-common/project
[info] Set current project to common-project (in build file:/Users/me/dev/common-project/)
[info] Defining */*:sbtStructureOptions
[info] The new value will be used by */*:ssOptions
[info] Reapplying settings...
[info] Set current project to common-project (in build file:/Users/me/dev/common-project/)
[info] Resolving [dependencies]
...
[info] Writing structure to /private/var/folders/fh/63rcbt095332gl82cg0zv_p00000gn/T/sbt-structure.xml...
[info] Done.
[success] Total time: 31 s, completed Dec 18, 2018 12:19:55 PM
[info] Reapplying settings...
[info] Set current project to common-project (in build file:/Users/me/dev/common-project/)
URI scheme is not "file"

否则该项目有效(在命令行中使用SBT编译+运行)。

由于IntelliJ无法转储项目结构,因此无法在我的代码中导入库,因此使IDE无效。

1 个答案:

答案 0 :(得分:1)

正如@ y.bedrov所说,解决方案是:

Issue should be fixed since 2018.3.519 version: youtrack.jetbrains.com/issue/SCL-14635. You could get nightly build here: confluence.jetbrains.com/display/SCA/Scala+Plugin+Nightly

  • 订阅每晚构建
  • 将Intellij的Scala插件更新为高于2018.3.519的版本
  • 刷新项目