Macro source is always recompiled if it contains quasiquotes.

23 views
Skip to first unread message

Dmitry Grigoriev

unread,
Feb 19, 2014, 6:25:43 PM2/19/14
to simple-b...@googlegroups.com
Hi all.

Noticed subj. Just now rewritten a single "throw" statement generation from Apply(...) to q"..." in this macro and it started to recompile it on every build. Before, I was wondering why some of my sources are always recompiled but now I see pattern. Use scala 2.10.3 + macro-paradize 2.0.0-SNAPSHOT + sbt 0.13.1.

Grzegorz Kossakowski

unread,
Feb 19, 2014, 6:41:56 PM2/19/14
to simple-b...@googlegroups.com
Hi Dmitry!

What does 'last compile' show?


On 20 February 2014 00:25, Dmitry Grigoriev <ma...@dimgel.ru> wrote:
Hi all.

Noticed subj. Just now rewritten a single "throw" statement generation from Apply(...) to q"..." in this macro and it started to recompile it on every build. Before, I was wondering why some of my sources are always recompiled but now I see pattern. Use scala 2.10.3 + macro-paradize 2.0.0-SNAPSHOT + sbt 0.13.1.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
To post to this group, send email to simple-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/groups/opt_out.



--
Grzegorz Kossakowski
Scalac hacker at Typesafe
twitter: @gkossakowski

Dmitry Grigoriev

unread,
Feb 19, 2014, 6:55:09 PM2/19/14
to simple-b...@googlegroups.com


On Thursday, February 20, 2014 3:41:56 AM UTC+4, Grzegorz Kossakowski wrote:
What does 'last compile' show?



> last compile
[debug]
[debug] Initial source changes:
[debug]         removed:Set(embeddedFile--QuasiquoteCompat.scala@c21608c0d6e04e869dfed4067005d5f5)
[debug]         added: Set()
[debug]         modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set(/home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/src/main/scala/ru/dimgel/lib/util/macros/MacroUtil.scala, embeddedFile--QuasiquoteCompat.scala@c21608c0d6e04e869dfed4067005d5f5)
[debug]
[debug] Sources indirectly invalidated by:
[debug]         product: Set()
[debug]         binary dep: Set()
[debug]         external source: Set()
[debug] All initially invalidated sources: Set(/home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/src/main/scala/ru/dimgel/lib/util/macros/MacroUtil.scala, embeddedFile--QuasiquoteCompat.scala@c21608c0d6e04e869dfed4067005d5f5)
[info] Compiling 1 Scala source to /home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/target/scala-2.10/classes...
[debug] Getting compiler-interface from component compiler for Scala 2.10.3
[debug] Getting compiler-interface from component compiler for Scala 2.10.3
[debug] Running cached compiler 7e28f39a, interfacing (CompilerInterface) with Scala compiler version 2.10.3
[debug] Calling Scala compiler with arguments  (CompilerInterface):
[debug]         -target:jvm-1.6
[debug]         -deprecation
[debug]         -unchecked
[debug]         -feature
[debug]         -Xplugin:/home/me/.ivy2/cache/org.scala-lang.plugins/macro-paradise_2.10.3/jars/macro-paradise_2.10.3-2.0.0-SNAPSHOT.jar
[debug]         -bootclasspath
[debug]         /usr/lib64/icedtea7/jre/lib/resources.jar:/usr/lib64/icedtea7/jre/lib/rt.jar:/usr/lib64/icedtea7/jre/lib/sunrsasign.jar:/usr/lib64/icedtea7/jre/lib/jsse.jar:/usr/lib64/icedtea7/jre/lib/jce.jar:/usr/lib64/icedtea7/jre/lib/charsets.jar:/usr/lib64/icedtea7/jre/lib/netx.jar:/usr/lib64/icedtea7/jre/lib/plugin.jar:/usr/lib64/icedtea7/jre/lib/rhino.jar:/usr/lib64/icedtea7/jre/lib/jfr.jar:/usr/lib64/icedtea7/jre/classes:/home/me/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.10.3.jar
[debug]         -classpath
[debug]         /home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/target/scala-2.10/classes:/home/me/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.3.jar
[warn] ....
[warn] 67 warnings found
[debug] Scala compilation took 6.977379522 s
[debug] Invalidated by transitive public inheritance: Set(embeddedFile--QuasiquoteCompat.scala@c21608c0d6e04e869dfed4067005d5f5, /home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/src/main/scala/ru/dimgel/lib/util/macros/MacroUtil.scala)
[debug] Invalidated by direct dependency: Set()
[debug] New invalidations:
[debug]         Set()
[debug] Previously invalidated, but (transitively) depend on new invalidations:
[debug]         Set()
 

Grzegorz Kossakowski

unread,
Feb 19, 2014, 6:58:08 PM2/19/14
to simple-b...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
To post to this group, send email to simple-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/groups/opt_out.

Dmitry Grigoriev

unread,
Feb 19, 2014, 6:59:37 PM2/19/14
to simple-b...@googlegroups.com
> [debug] Invalidated by transitive public inheritance: Set(embeddedFile--QuasiquoteCompat.scala@c21608c0d6e04e869dfed4067005d5f5, /home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/src/main/scala/ru/dimgel/lib/util/macros/MacroUtil.scala)

Each time it shows different hexadecimal suffix after QuasiquoteCompat.scala:
[debug] Invalidated by transitive public inheritance: Set(/home/me/work/scala/metattempt/modules/ru-dimgel-lib-util/src/main/scala/ru/dimgel/lib/util/macros/MacroUtil.scala, embeddedFile--QuasiquoteCompat.scala@c39e315866c944f1972bfa1600158ecf)

Dmitry Grigoriev

unread,
Feb 19, 2014, 7:15:12 PM2/19/14
to simple-b...@googlegroups.com
On Thursday, February 20, 2014 3:58:08 AM UTC+4, Grzegorz Kossakowski wrote:
You'll need to update your macro paradise plugin to 2.0.0-M3, see:


HURRAH! "It's getting better all the time!" (c)
Great many thanks. :)
It took a bit of time to find that 2.0.0-M3, I even used old "org.scala-lang.plugins" % "macro-paradise" instead of "org.scalamacros" % "paradise".

Reply all
Reply to author
Forward
0 new messages