Skip to content

GeoSlick doesn't work properly with IntelliJ #4

@pkukielka

Description

@pkukielka

Everything seems to be compiling properly, but if you will try to edit code which uses GeoSlick with IntelliJ then you will see a lot of red color ;) It is because of this fragment:

class SimpleQL extends super.SimpleQL with Implicits {
    type Postgis = PostgisDriver.Postgis
    type PostgisTable[T] = PostgisDriver.PostgisTable[T]
}

// (...)

override val simple = new SimpleQL
import simple._

I'm not sure if overriding val here is so good idea. It's quite similar to cake pattern, where def should be always preferred. If you would change this code to something like that:

class ExtendedQL extends super.SimpleQL with Implicits {
    type Postgis = PostgisDriver.Postgis
    type PostgisTable[T] = PostgisDriver.PostgisTable[T]
}

// (...)

val extended = new ExtendedQL
import extended._

and then fix few imports, then IntelliJ will be fixed.
And I think it will be also safer, since there will be no risk of some weird name collisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions