Skip to content

not found: type ... when using doc without explicit import  #121

Description

@JustinPihony

When you specify a type through inheritance without an explicit import then you get a compiler error in the doc task.

This is reproducible in the Lagom Java Chirper Example. Update the project/plugins.sbt by adding the following to the defaultPlugins Seq:

sbtPluginExtra("com.eed3si9n" % "sbt-buildinfo" % "0.7.0", sbtV, scalaV)

Then update the build.sbt's chirplmpl to start like this:

lazy val chirpImpl = project("chirp-impl")
  .enablePlugins(LagomJava, BuildInfoPlugin)
  .settings(
    buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
    buildInfoPackage := "chirp",
    ...

Now when you run sbt doc you get the following:

[error] /lagom-java-chirper-example-master/chirp-impl/src/main/java/sample/chirper/chirp/impl/ChirpRepositoryImpl.java:119: not found: type ReadSideHandler
[error] public ReadSideHandler buildHandler() {

The current workaround is to go to ChirpRepositoryImpl.java and add

import com.lightbend.lagom.javadsl.persistence.ReadSideProcessor.ReadSideHandler;

This is needed because ReadSideHandler is only available due to the extension of ReadSideProcessor, but is not working once you add sbt-buildinfo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions