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

Assertion error when trying to reference abstract type in Macro #13563

Closed
cemelo opened this issue Sep 20, 2021 · 1 comment · Fixed by #12540
Closed

Assertion error when trying to reference abstract type in Macro #13563

cemelo opened this issue Sep 20, 2021 · 1 comment · Fixed by #12540
Labels
Milestone

Comments

@cemelo
Copy link

cemelo commented Sep 20, 2021

I'm not sure if this should work or not, but I do have a use case that I'm trying to fulfill using something similar to what follows.

Compiler version

3.1.0-RC1

Minimized code

import scala.quoted.{Expr, Quotes, Type}

trait SomeTypeclass[A]:
  def runEffect[F[_]](): F[Int]

object SomeTypeclass:

  inline def derived[T]: SomeTypeclass[T] = ${ generateImpl[T] }
  def generateImpl[T: Type](using q: Quotes): Expr[SomeTypeclass[T]] =
    import q.reflect.*

    '{
      new SomeTypeclass[T] {
        override def runEffect[F[_]](): F[Int] = ${ runEffectImpl[F] }
      }
    }

  inline def runEffectImpl[F[_]: Type](using q: Quotes): Expr[F[Int]] =
    '{ ??? }

Output (click arrow to expand)

Fails to compile and throws an assertion error instead.

java.lang.AssertionError: assertion failed: unresolved symbols: type F (line 16) #18013 when pickling /tmp/scastie3760419140958137017/src/main/scala/main.scala
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:777)
	at dotty.tools.dotc.quoted.PickledQuotes$.pickle(PickledQuotes.scala:167)
	at dotty.tools.dotc.quoted.PickledQuotes$.pickleQuote(PickledQuotes.scala:36)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.pickleAsTasty$1(PickleQuotes.scala:221)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.pickledQuote(PickleQuotes.scala:296)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformQuotation(PickleQuotes.scala:141)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:118)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1464)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1500)
	at scala.collection.immutable.List.mapConserve(List.scala:472)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1500)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformSub(Trees.scala:1504)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1430)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformWithCapturer(PickleQuotes.scala:412)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.body$3(PickleQuotes.scala:393)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.makeLambda$$anonfun$1(PickleQuotes.scala:403)
	at dotty.tools.dotc.ast.tpd$.DefDef(tpd.scala:285)
	at dotty.tools.dotc.ast.tpd$.Closure(tpd.scala:120)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.makeLambda(PickleQuotes.scala:403)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.splitSplice(PickleQuotes.scala:433)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformSplice(PickleQuotes.scala:315)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:129)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.splitQuote(PickleQuotes.scala:428)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformQuotation(PickleQuotes.scala:136)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:118)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1390)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1396)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:93)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:35)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:41)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:54)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1484)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
	at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
	at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
	at dotty.tools.dotc.transform.PickleQuotes$$anon$1.transform(PickleQuotes.scala:94)
	at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
	at dotty.tools.dotc.transform.PickleQuotes.run(PickleQuotes.scala:90)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:308)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:309)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:261)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:272)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:280)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:289)
	at dotty.tools.dotc.Run.compileSources(Run.scala:222)
	at dotty.tools.dotc.Run.compile(Run.scala:206)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
	at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
	at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
@nicolasstucki
Copy link
Contributor

Minimized to

import scala.quoted.*
def foo(using Quotes): Unit =
  '{ def bar[T](): Unit = ${ summon[Type[T]]; ??? }; () }

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Oct 12, 2021
@nicolasstucki nicolasstucki linked a pull request Oct 12, 2021 that will close this issue
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Oct 12, 2021
Split cross quote reference handling from pickling

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
@anatoliykmetyuk anatoliykmetyuk added Spree Suitable for a future Spree and removed Spree Suitable for a future Spree labels Oct 15, 2021
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2021
Split cross quote reference handling from pickling

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 18, 2021
Split cross quote reference handling from pickling

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 23, 2021
Split cross quote reference handling from pickling

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 29, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 30, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Dec 1, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleType`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Dec 15, 2021
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 3, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 4, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 13, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 19, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 20, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 20, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 21, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 2, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563

Support -Yscala-relese macros

Disable tests/pos-macros/backwardCompat-3.0

Fix issue with captured types at level 0
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 4, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563

Support -Yscala-relese macros

Disable tests/pos-macros/backwardCompat-3.0

Fix issue with captured types at level 0
@nicolasstucki nicolasstucki added area:metaprogramming:quotes Issues related to quotes and splices and removed area:metaprogramming labels Feb 7, 2022
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 28, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Mar 4, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Mar 14, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Mar 24, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 11, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 19, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 19, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 19, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
michelou pushed a commit to michelou/dotty that referenced this issue Apr 25, 2022
Separate the logic that creates holes in quotes from the logic that
pickles the quotes. Holes are created in the `Splicer` phase and the
result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes`
phase only needs to extract the contents of the holes, pickle the quote
and put them into a call to `unpickleExprV2`/`unpickleTypeV2`.

We add `unpickleExprV2` to support some optimization in the encoding of
the pickled quote. Namely we removed an unnecessary lambda from the
arguments of the hole passed into the contents of the hole. By not
changing `unpickleExpr` the current compiler will be able to handle the
old encoding in binaries compiled with older compilers.
The `unpickleTypeV2` is just a version of `unpickleType` that does not
take the `termHole` parameter which is always `null`.
With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to
the old `unpickleExpr`/`unpickleType`.

Fixes scala#8100
Fixes scala#12440
Fixes scala#13563
Fixes scala#14337
Fixes scala#14373
Closes scala#13732
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants