You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a source file contains a pattern matching on scala.quoted.Type, an exception tastyquery.Exceptions$TastyFormatException: Unexpected type tag BLOCK is thrown. This affects Tasty-MiMa.
Minimal example:
// the-lib/src/main/scala/foo/package.scalapackagefooimportscala.quoted.*deffooMacro(usingQuotes):Expr[Unit] =Type.of[Any] match {
case'[r] =>'{()}
}
$ sbt clean compile run
[info] welcome to sbt 1.8.2 (Oracle Corporation Java 11.0.18)
...
[info] running run
[error] tastyquery.Exceptions$TastyFormatException: Unexpected type tag BLOCK at address Addr(233) in file the-lib/target/scala-3.2.2/classes/foo/package$package.tasty
[error] at tastyquery.reader.tasties.TreeUnpickler.readType(TreeUnpickler.scala:1171)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTypeTree(TreeUnpickler.scala:1376)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTerm$$anonfun$1(TreeUnpickler.scala:807)
[error] at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTerm(TreeUnpickler.scala:807)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTerm(TreeUnpickler.scala:795)
[error] at tastyquery.reader.tasties.TreeUnpickler.$anonfun$15(TreeUnpickler.scala:753)
[error] at dotty.tools.tasty.TastyReader.collectWhile(TastyReader.scala:137)
[error] at tastyquery.reader.tasties.TreeUnpickler.readPattern(TreeUnpickler.scala:754)
[error] at tastyquery.reader.tasties.TreeUnpickler.readCaseDef(TreeUnpickler.scala:1012)
[error] at tastyquery.reader.tasties.TreeUnpickler.readCases$$anonfun$2(TreeUnpickler.scala:1003)
[error] at dotty.tools.tasty.TastyReader.collectWhile(TastyReader.scala:137)
[error] at tastyquery.reader.tasties.TreeUnpickler.readCases(TreeUnpickler.scala:1004)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTerm(TreeUnpickler.scala:899)
[error] at tastyquery.reader.tasties.TreeUnpickler.readValOrDefDef(TreeUnpickler.scala:660)
[error] at tastyquery.reader.tasties.TreeUnpickler.readStat(TreeUnpickler.scala:423)
[error] at tastyquery.reader.tasties.TreeUnpickler.readStats$$anonfun$1(TreeUnpickler.scala:367)
[error] at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125)
[error] at tastyquery.reader.tasties.TreeUnpickler.readStats(TreeUnpickler.scala:367)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTemplate(TreeUnpickler.scala:597)
[error] at tastyquery.reader.tasties.TreeUnpickler.readStat(TreeUnpickler.scala:406)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTopLevelStat(TreeUnpickler.scala:363)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTopLevelStat$$anonfun$1(TreeUnpickler.scala:362)
[error] at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125)
[error] at tastyquery.reader.tasties.TreeUnpickler.readTopLevelStat(TreeUnpickler.scala:362)
[error] at tastyquery.reader.tasties.TreeUnpickler.read$1(TreeUnpickler.scala:46)
[error] at tastyquery.reader.tasties.TreeUnpickler.unpickle(TreeUnpickler.scala:50)
[error] at tastyquery.reader.Loaders$Loader.enterTasty$1(Loaders.scala:109)
[error] at tastyquery.reader.Loaders$Loader.inspectClass$1(Loaders.scala:95)
[error] at tastyquery.reader.Loaders$Loader.completeRoot(Loaders.scala:136)
[error] at tastyquery.reader.Loaders$Loader.loadAllRoots$$anonfun$1$$anonfun$2(Loaders.scala:147)
[error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
[error] at scala.IArray$package$IArray$.foreach(IArray.scala:123)
[error] at tastyquery.reader.Loaders$Loader.loadAllRoots$$anonfun$1(Loaders.scala:147)
[error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] at scala.Option.foreach(Option.scala:437)
[error] at tastyquery.reader.Loaders$Loader.loadAllRoots(Loaders.scala:147)
[error] at tastyquery.Symbols$PackageSymbol.declarations(Symbols.scala:1347)
[error] at run$package$.run(run.scala:14)
[error] at run.main(run.scala:8)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) tastyquery.Exceptions$TastyFormatException: Unexpected type tag BLOCK at address Addr(233) in file the-lib/target/scala-3.2.2/classes/foo/package$package.tasty
[error] Total time: 0 s, completed Apr 17, 2023, 5:29:42 PM
Expected result
The call to ctx.findPackage("foo").declarations succeeds, its result value (List) is printed.
The text was updated successfully, but these errors were encountered:
If a source file contains a pattern matching on
scala.quoted.Type
, an exceptiontastyquery.Exceptions$TastyFormatException: Unexpected type tag BLOCK
is thrown. This affects Tasty-MiMa.Minimal example:
Running tasty-query in
run.scala
:Expected result
The call to
ctx.findPackage("foo").declarations
succeeds, its result value (List) is printed.The text was updated successfully, but these errors were encountered: