Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JustinPihony opened this issue Apr 9, 2018 · 2 comments
Open

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

JustinPihony opened this issue Apr 9, 2018 · 2 comments

Comments

@JustinPihony
Copy link

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

@dwijnand
Copy link
Member

dwijnand commented Apr 9, 2018

this is so confusing/insane. how does generating build info of name, version, scalaVersion and sbtVersion affect generating docs for src/main/java/sample/chirper/chirp/impl/ChirpRepositoryImpl.java??

@JustinPihony
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants