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

Extension methods disappear if giving them Scaladoc #82

Open
Atry opened this issue Jun 9, 2017 · 1 comment
Open

Extension methods disappear if giving them Scaladoc #82

Atry opened this issue Jun 9, 2017 · 1 comment

Comments

@Atry
Copy link

Atry commented Jun 9, 2017

addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)

libraryDependencies += "com.github.mpilquist" %% "simulacrum" % "0.11.0"
import simulacrum.typeclass

@typeclass
trait MyTypeClass[A] {
  type Out

  /** Scaladoc for `myMethod` */
  def myMethod(byName: A): Out
}

object MyTypeClass {

  def shouldCompile(ops: MyTypeClass.Ops[Int]) = {
    ops.myMethod
  }

}
$ sbt ++2.12.2 doc
[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from /Users/twer/.sbt/0.13/plugins
[info] Loading project definition from /private/tmp/typeclassdoc/project
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Setting version to 2.12.2
[info] Reapplying settings...
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Main Scala API documentation to /private/tmp/typeclassdoc/target/scala-2.12/api...
[error] /private/tmp/typeclassdoc/MyTypeClass.scala:14: value myMethod is not a member of MyTypeClass.Ops[Int]
[error]     ops.myMethod
[error]         ^
[info] No documentation generated with unsuccessful compiler run
[error] one error found
[error] (compile:doc) Scaladoc generation failed
[error] Total time: 2 s, completed Jun 9, 2017 12:12:49 PM
$ sbt ++2.11.11 doc
[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from /Users/twer/.sbt/0.13/plugins
[info] Loading project definition from /private/tmp/typeclassdoc/project
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Setting version to 2.11.11
[info] Reapplying settings...
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Main Scala API documentation to /private/tmp/typeclassdoc/target/scala-2.11/api...
[error] /private/tmp/typeclassdoc/MyTypeClass.scala:14: value myMethod is not a member of MyTypeClass.Ops[Int]
[error]     ops.myMethod
[error]         ^
[info] No documentation generated with unsuccessful compiler run
[error] one error found
[error] (compile:doc) Scaladoc generation failed
[error] Total time: 2 s, completed Jun 9, 2017 12:13:03 PM
Atry added a commit to ThoughtWorksInc/DeepLearning.scala that referenced this issue Jun 16, 2017
@fosskers
Copy link

This still occurs.

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