IDEA 2017.2 with SBT 1.0 support - build project does nothing

Hey,

I have IDEA 2017.2 with Scala plugin 2017.2.5. I have Play 2.6 project and turned on option `Use SBT shell for build and import (requires sbt 0.13.5+)`.

My project uses sbt 0.13.15, Scala 2.12.2.

So, I build the project using IDEA, the progress bar finishes within a second without any window. But when I start SBT shell and `compile`, I see some errors.

Can you please explain, how `Build Project` is supposed to work? I thought with `Use SBT shell for build and import`  option checked, IDEA will compile the project and show me any errors using IDEA's error/problems window, so I don't have to use terminal anymore.

Thanks

0
8 comments

Can you check if the problem persists after you reimport the project?

What you should see: The embedded sbt shell should start and show the build output. Errors from the shell compile are currently not shown in the IDE problems window.

0

Thanks Justin. That was it.

You have to reimport SBT project after checking `Use SBT shell for build and import`  option. 

Please consider some popup with info, that IDEA must reimport project after someone turns on that option (if needed).

But in my another project (Play 2.6, Scala 2.12, SBT 0.13.15), SBT refresh process ends up with

[error] Not a valid command: idea-shell (similar: shell)
[error] Not a valid project ID: idea-shell
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: idea-shell (similar: daemon-shell, daemonShell)
[error] idea-shell
[error] ^

Process finished with exit code 1

and IDEA's progress bar is stuck causing high CPU usage.

2

It's not the option itself, but that it depends on some data that changed serialization format in this release. You are right that there should be a better feedback when it fails to load/access this data for whatever reason.

Does the Play project load fail with this error reproducibly even after restarting the sbt shell for that project? It's been a spurious bug I've been hunting for a while.

0

Bad luck Justin. It happend 3 times in a row. 

Wanted to reproduce it again, so I cleared logs, restarted IDEA, turned on `sbt build` option and `sbt refresh` worked.

Even if I check previous logs, the only error I see is

2017-07-20 08:58:07,250 [ 309247] INFO - com.intellij.ide.PrivacyPolicy - /Users/lgr/Library/Application Support/JetBrains/PrivacyPolicy/Cached (Permission denied) 
java.io.FileNotFoundException: /Users/lgr/Library/Application Support/JetBrains/PrivacyPolicy/Cached (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1282)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1276)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1268)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1265)
at com.intellij.ide.PrivacyPolicy.updateText(PrivacyPolicy.java:121)
at com.intellij.ide.PrivacyPolicyUpdater.a(PrivacyPolicyUpdater.java:71)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
1

Too bad, thanks anyway!

0
Avatar
Permanently deleted user

My issue here could be related to this: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000530510-SBT-Shell-Error-Not-a-valid-key-idea-shell

I have invalidated cache and re-indexed and it still doesn't work. 

Hope there is a solution to this soon.

0

Well it's June 2019 (almost two years later) and I'm having this problem so I guess there is no solution.  IntelliJ used to be "develop with pleasure" but now I have so many of these headaches I wonder if I shouldn't bite the bullet and just use Emacs.

0
Avatar
Permanently deleted user

I am also facing this issue, should I uninstall intellij, or I can expect it to be fixed soon?

0

Please sign in to leave a comment.