‹ jan0sch.de

Slick and slick-pg compiler error.


If you happen to use the fine postgres extension for slick named slick-pg then you might stumble into an issue where the compiler complains about missing implicits for column types that should be provided by slick-pg if you override the api method of the custom postgres driver.

[error] .../src/main/scala/Tables.scala:13: could not find implicit value for parameter tt: slick.ast.TypedType[java.time.ZonedDateTime]
[error]     def z = column[ZonedDateTime]("z")
[error]                                  ^
[error] .../src/main/scala/Tables.scala:16: could not find implicit value for parameter tt: slick.ast.TypedType[com.vividsolutions.jts.geom.Point]
[error]     def p = column[Point]("p")
[error]                          ^
[error] two errors found
[error] (compile:compileIncremental) Compilation failed

This might be caused by a type annotation on the overriden api method like this:

override val api: API = ???

A type annotation could have been added by your IDE if you use built in functionalities like “override methods”. However to compile the code the type annotation has to be removed:

override val api = ???