IDEA complains about Revolver.settings when trying to parse spray-template's build.sbt file
Asked Answered
P

1

10

I've cloned the Spray template project (branch on_spray-can_1.1) as suggested on Spray's "Getting Started" page, and used sbt-idea to generate a corresponding IDEA project. It builds fine, but when I open my build.sbt file, the last line makes IDEA unhappy:

seq(Revolver.settings: _*)

It doesn't recognize Revolver, and suggests importing spray.revolver.RevolverPlugin.Revolver, which seems reasonable. However, when I do that, it still complains "Expression type (Def.SettingsDefinition) must conform to Setting[_] in SBT file".

Clearly this is not a real problem, or IDEA's (external) make would fail, and/or SBT would complain from the command line. But why does IDEA think it's a problem? Has something changed in recent versions of SBT?

When I look at the SBT 0.13.0 source I notice seq is deprecated; it says "In build.sbt files, this call can be removed." If I do that, however, Revolver stops working ("Not a valid command: re-start").

FWIW, I'm using SBT 0.13.0 with Scala 2.10.3 and IDEA 12.1.6 on Mint 14.

Peabody answered 24/10, 2013 at 23:35 Comment(2)
Try gen-idea sbt-classifier when generating the idea project from sbt.Pompeii
That creates an IDEA module with all sources downloaded and attached, but doesn't seem to do anything about my actual problem AFAICT.Peabody
P
7

You should be able to replace it by just

Revolver.settings
Pompeii answered 26/10, 2013 at 17:40 Comment(4)
That works, but IDEA still says "Expression type (Def.SettingsDefinition) must conform to Setting[_] in SBT file".Peabody
@DavidMoles, you can surpress the warning by using Revolver.settings: Seq[sbt.Def.Setting[_]]. Inside, it will be expanded to Revolver.settings.settings, which is funny to write:)Offen
Thanks, it really removed the error IntelliJ showed, but still for some reason when I change class code and refresh on browser it doesn't update. In addition I added "spray-json" support, but I am unable to import it to the project. Any reason for that?Zannini
Regarding the first error: Do you use ~ re-start?Pompeii

© 2022 - 2024 — McMap. All rights reserved.