-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Assert that memberType selects an existing memberType #15161
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
Conversation
I found 2 bugs in Scaladoc.
java.lang.AssertionError: assertion failed: val aValInt is not a member of tests.exports2.B
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at scala.quoted.runtime.impl.QuotesImpl$reflect$TypeReprMethods$.memberType(QuotesImpl.scala:1741)
at scala.quoted.runtime.impl.QuotesImpl$reflect$TypeReprMethods$.memberType(QuotesImpl.scala:1740)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.unwrapMemberInfo(ClassLikeSupport.scala:488)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.unwrapMemberInfo$(ClassLikeSupport.scala:15)
at dotty.tools.scaladoc.tasty.TastyParser.unwrapMemberInfo(TastyParser.scala:169)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseValDef(ClassLikeSupport.scala:445)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseValDef$(ClassLikeSupport.scala:15)
at dotty.tools.scaladoc.tasty.TastyParser.parseValDef(TastyParser.scala:169)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember$$anonfun$1(ClassLikeSupport.scala:179)
at dotty.tools.scaladoc.tasty.TastyParser.processTreeOpt(TastyParser.scala:204)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember(ClassLikeSupport.scala:185)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember$$anonfun$1$$anonfun$7(ClassLikeSupport.scala:163)
at scala.Option.flatMap(Option.scala:283)
at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember$$anonfun$1(ClassLikeSupport.scala:169) |
@pikinier20 could you investigate those bugs? |
Thank you @pikinier20 |
We still have an issue with protoquill. I will investigate. It is probably the same bug in the macro implementation. |
@deusaquilus in this PR I found a bug in protoquill. I added an assertion to make sure that the selected member exists. The seems to try to create the type [error] -- Error: /__w/dotty/dotty/community-build/community-projects/protoquill/quill-sql/src/test/scala/io/getquill/metaprog/StaticSpliceSpec.scala:13:56
[error] 13 | ctx.run { query[Person].filter(p => p.name == static(Mod.modVal)) }.string mustEqual
[error] | ^^^^^^^^^^^^^^^^^^
[error] |Exception occurred while executing macro expansion.
[error] |java.lang.AssertionError: assertion failed: module class Mod$ is not a member of (io.getquill.util.prep.Mod.modVal : String)
[error] | at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
[error] | at scala.quoted.runtime.impl.QuotesImpl$reflect$TypeReprMethods$.memberType(QuotesImpl.scala:1741)
[error] | at scala.quoted.runtime.impl.QuotesImpl$reflect$TypeReprMethods$.memberType(QuotesImpl.scala:1740)
[error] | at io.getquill.context.StaticSpliceMacro$TermOwnerIsModule$.unapply$$anonfun$2(StaticSpliceMacro.scala:78)
[error] | at scala.Option.flatMap(Option.scala:283)
[error] | at io.getquill.context.StaticSpliceMacro$TermOwnerIsModule$.unapply(StaticSpliceMacro.scala:82)
[error] | at io.getquill.context.StaticSpliceMacro$.apply(StaticSpliceMacro.scala:114)
[error] |
[error] |----------------------------------------------------------------------------
[error] |Inline stack trace
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] |This location contains code that was inlined from Dsl.scala:62
[error] 62 | inline def static[T](inline value: T): T = ${ StaticSpliceMacro('value) }
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] |This location contains code that was inlined from Dsl.scala:62
[error] 3 |export Dsl._
[error] | ^^^
[error] ---------------------------------------------------------------------------- |
b5c5292
to
e5747fb
Compare
e5747fb
to
980090b
Compare
Hey @nicolasstucki do you plan on returning back to this? Are you waiting on anything else for it? How can I help move this forward? |
d7b3b18
to
6e27cf8
Compare
Fixes #15159
Updates buggy tests of #13230