False red squiggles with Akka HTTP dsl routing/parameters

The following code is not interpreted correctly:

val example =
parameters('color, 'backgroundColor ? "white") { (color, backgroundColor) =>
complete(s"The color is '$color' and the background is '$backgroundColor'")

Tooltip errors:

parameters: Cannot resolve reference parameters with such signature

'backgroundColor: Too many arguments for method parameters(ParameterDirectives.ParamMagnet)

backgroundColor: Missing parameter type: backgroundColor


Compiling the project with IDEA and SBT does not give any errors/warnings and the project just runs fine.

Probably something to do with the following?


I am using:

IntelliJ IDEA (Community Edition) IC-144.4199.23
Build #IC-144.4199, built on February 19, 2016
JRE: 1.8.0_66-b17 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

Scala Plugin:

Scala 2.11.7
Akka 2.4.2


Comment actions Permalink

I have had issues with this as well - what's frustrating is that it used to work just fine.  Its related to some recent change with the editor.

My issue is here: SCL-9877

I'm hoping they can address this soon as its become a show stopper for me.

Comment actions Permalink

I join the choir here - its a really visually distracting bug +100 to get i fixed

Comment actions Permalink

yes please, confirm this is still happening!

Comment actions Permalink

I can confirm that on 22 May 2018 this is still happening

Comment actions Permalink

I can circumvent the issue by toggling the scala version in build.sbt. I toggle between 2.11.6 <-> 2.11.7, each time i toggle the red lines disappears,,, super annoying.

Comment actions Permalink

@Krille0x7c2 Can you give an example of your code? This is quite strange behaviour. Which versions of IDEA and scala plugin do you use?

Comment actions Permalink

//Scala version 2.12.4

//IDEA version 2017.1.6

package rest
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._

import scalaoauth2.provider.{AuthInfo}
import models.Hub._
import dal.{UserDal}
import models._

trait UsersApi extends UserDal
with JsonMappings
with OAuth2RouteProvider[AccountsRow] {
def usersGet = path("users") {
get {
authenticateOAuth2Async[AuthInfo[AccountsRow]]("realm", oauth2Authenticator) {
auth => complete(this.findUser)

//the red squiggles occur on the line starting auth =>
//the code compiles and runs every time

Comment actions Permalink

Can you try more recent version of IDEA? There was a number of improvement since 2017.1. Your example is not self-contained, so I cannot check it myself.


Please sign in to leave a comment.