-
Notifications
You must be signed in to change notification settings - Fork 60
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
sbt doc
fails on @typeclasses
methods with scaladocs
#90
Comments
I was able to write a typeclass just now that has scaladocs on both the |
This issue still exists. If you write any scaladoc for any method in a trait annotated with Happens only when using Currently I have working solution to this problem, so I'll try to create a PR soon. |
Great news, looking forward to the PR!
… On Jan 15, 2019, at 8:32 PM, Dariusz ***@***.***> wrote:
This issue still exists. If you write any scaladoc for any method in a trait annotated with @typeclass then sbt doc will fail. But only if you have any usage of your type class somewhere in code. Of course sbt compile works fine.
Happens only when using sbt doc:
Problem described by @amirkarimi is caused by the way how compiler is generating AST. During normal compilation methods are available as DefDef type even when they have scaladoc comment which is just ignored.
But during sbt doc compiler generates a little different AST. Every method that has scaladoc comment is described as DocDef(comment, DefDef(...)) which causes that macro isn't recognizing them at all and no methods (that has scaladoc comment) are added to generated trait Ops[_] for our type class.
That's why problem only occurs if there is any usage. Generated trait that you import doesn't have required method(s), ergo implicit conversion doesn't happen at all (this can be simply checked by adding compiler option: -Xlog-implicit-conversions), thus message about missing member.
Currently I have working solution to this problem, so I'll try to create a PR soon.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Issue #90, added support for DocDef
Supposing the following implementation:
Build.sbt:
It compiles successfully but running
sbt doc
will return the following error:It might have something to do with macro paradise.
The text was updated successfully, but these errors were encountered: