3

Updating to Intellij Ultimate 2018.3 from 2018.2 broke the project sync of one of my project under SBT.

It is depending on another git repo in build.sbt

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)

During project import, Intellij can dump the project structure but fails to import to Intellij project model with the following error : URI scheme is not "file" :

intellij fails to import to project model


Here is the output of the project build console :

;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"

The project is valid (compiles + runs using SBT in command line) otherwise.

Since IntelliJ can't dump the project structure, it's unable to import libraries in my code, thus rendering the IDE useless.

whisust
  • 158
  • 1
  • 16
  • 1
    What Scala plugin version do you use? Issue should be fixed since 2018.3.519 version: https://youtrack.jetbrains.com/issue/SCL-14635. You could get nightly build here: https://confluence.jetbrains.com/display/SCA/Scala+Plugin+Nightly – y.bedrov Dec 18 '18 at 12:07
  • First, try the following refresh/reset steps: 1. Refresh your SBT (through the UI: sbt bar on the right -> little refresh symbol); 2. Build -> Build Project (and then Rebuild Project); 3. `sbt clean compile`; right click on `app` folder -> Rebuild; 4. try these in any random order. Next, delete your `target` folder and try that stuff again. If that doesn't work, close & reopen IntelliJ and try the same. I honestly have no idea what causes this or what steps actually fix this - I usually just employ some targeted button-mashing until something fixes itself. – James Whiteley Dec 18 '18 at 12:17
  • sometimes you need to reinstall plugins when you change the version of IDEA – Serhii Shynkarenko Dec 18 '18 at 13:22
  • @y.bedrov I'm on the `v2018.3.4` version of the scala plugin, with IDEA v2018.3.2 - Build IU-183.4886.12. I switched to the Beta Releases channel to try if there was a fix. I'll try with the nightly update of scala plugin. @JamesWhiteley Already did all of that :) @SergeyShinkarenko That's strange to have to manually execute deploy steps and to have to know internals of a software you pay and don't maintain? But thanks for the hint, I didn't try that, we'll see if everything else fails. – whisust Dec 18 '18 at 13:39

1 Answers1

1

As @y.bedrov said, solution was :

Issue should be fixed since 2018.3.519 version: http://youtrack.jetbrains.com/issue/SCL-14635.

You could get nightly build here: http://confluence.jetbrains.com/display/SCA/Scala+Plugin+Nightly

  • Subscribe to nightly build
  • update Scala plugin for Intellij to a version higher than 2018.3.519
  • Refresh project
Community
  • 1
  • 1
whisust
  • 158
  • 1
  • 16