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

Make macros work again when compiling on Java 9 or 10, fixing 2.12.5 regression #6446

Merged
merged 1 commit into from Mar 23, 2018

Conversation

Projects
None yet
5 participants
@jvican
Copy link
Member

jvican commented Mar 20, 2018

Don't compute locations in macroclassloader cache.

Fixes scala/scala-dev#480.

It reports whenever AbstractFile.getUrl returns null if verbose is
enabled.

@scala-jenkins scala-jenkins added this to the 2.12.6 milestone Mar 20, 2018

@jvican jvican force-pushed the scalacenter:ticket/scala-dev/458 branch from 369c37c to 369c71a Mar 20, 2018

Don't compute `locations` in macroclassloader cache
Fixes scala/scala-dev#480.

It reports whenever `AbstractFile.getUrl` returns `null` if verbose is
enabled.

@retronym retronym force-pushed the scalacenter:ticket/scala-dev/458 branch from 369c71a to 957780f Mar 23, 2018

@retronym

This comment has been minimized.

Copy link
Member

retronym commented Mar 23, 2018

I just force-pushed a conflict resolution and minor refactoring to your branch.

@retronym

This comment has been minimized.

Copy link
Member

retronym commented Mar 23, 2018

Manually tested:

⚡ rm -rf macro.jar; qscalac -d macro.jar $(f 'import reflect.macros.blackbox._, language.experimental._; object M { def impl(c: Context) = {import c.universe._; println("macro impl");  q"()"}; def m: Unit = macro impl}') ; (java_use 9; ./build/pack/bin/scalac -Ymacro-debug-verbose -Ycache-macro-class-loader:last-modified -cp macro.jar $(f 'class Test { M.m }'))
macroExpand: expander = scala.tools.nsc.typechecker.Macros$DefMacroExpander@54422e18, expandee = Select[1](Ident[2](M#8174), TermName("m")#9651)
[1] TypeRef(ThisType(scala#33), scala.Unit#2027, List())
[2] SingleType(ThisType(<empty>#3), M#8174), desugared = ()
looking for macro implementation: macro method m
resolving macro implementation as M$.impl (isBundle = false)
macro classloader: caching is disabled because `AbstractFile.getURL` returned `null` for jrt:/packages.
macro classloader: initializing from -cp: Vector(jrt:/packages, file:/Users/jz/code/scala/build/pack/lib/jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar, file:/Users/jz/code/scala/build/pack/lib/scala-library.jar, file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar, file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar, file:/Users/jz/code/scala/build/pack/lib/scalap.jar, file:/Users/jz/code/scala/macro.jar)
classloader is: scala.reflect.internal.util.ScalaClassLoader$URLClassLoader@3336e6b6 of type class scala.reflect.internal.util.ScalaClassLoader$URLClassLoader with classpath [jrt:/packages,file:/Users/jz/code/scala/build/pack/lib/jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar,file:/Users/jz/code/scala/build/pack/lib/scala-library.jar,file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar,file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar,file:/Users/jz/code/scala/build/pack/lib/scalap.jar,file:/Users/jz/code/scala/macro.jar] and parent being jdk.internal.loader.ClassLoaders$PlatformClassLoader@707f7052 of type class jdk.internal.loader.ClassLoaders$PlatformClassLoader with classpath [<unknown>] and parent being primordial classloader with boot classpath [<unknown>]
successfully loaded macro impl as (class M$, public scala.reflect.api.Trees$LiteralApi M$.impl(scala.reflect.macros.blackbox.Context))
calculateUndetparams: Set()
performing macro expansion M.m at source-/private/tmp/a.scala,line-1,offset=15
context: MacroContext(m@source-/private/tmp/a.scala,line-1,offset=15 +0)
prefix: M
targs: List()
argss: List()
paramss: List()
binding: MacroImplBinding(false,true,M$,impl,List(List(Other)),List())
trees: List()
tags: List()
macroImplArgs: List()
macro impl
original:
()
Literal(Constant(()))
blackbox typecheck (against pt = ?): ((): Unit)
/code/scala on review/6446*
⚡ rm -rf macro.jar; qscalac -d macro.jar $(f 'import reflect.macros.blackbox._, language.experimental._; object M { def impl(c: Context) = {import c.universe._; println("macro impl");  q"()"}; def m: Unit = macro impl}') ; (java_use 1.8; ./build/pack/bin/scalac -Ymacro-debug-verbose -Ycache-macro-class-loader:last-modified -cp macro.jar $(f 'class Test { M.m }'))
macroExpand: expander = scala.tools.nsc.typechecker.Macros$DefMacroExpander@fad74ee, expandee = Select[1](Ident[2](M#6566), TermName("m")#7608)
[1] TypeRef(ThisType(scala#25), scala.Unit#1826, List())
[2] SingleType(ThisType(<empty>#3), M#6566), desugared = ()
looking for macro implementation: macro method m
resolving macro implementation as M$.impl (isBundle = false)
macro classloader: initializing from -cp: Vector(file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar, file:/Users/jz/code/scala/build/pack/lib/jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar, file:/Users/jz/code/scala/build/pack/lib/scala-library.jar, file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar, file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar, file:/Users/jz/code/scala/build/pack/lib/scalap.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/cldrdata.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/dnsns.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jaccess.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jfxrt.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/localedata.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/nashorn.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunec.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/zipfs.jar, file:/System/Library/Java/Extensions/MRJToolkit.jar, file:/Users/jz/code/scala/macro.jar)
classloader is: scala.reflect.internal.util.ScalaClassLoader$URLClassLoader@77e9807f of type class scala.reflect.internal.util.ScalaClassLoader$URLClassLoader with classpath [file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar,file:/Users/jz/code/scala/build/pack/lib/jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar,file:/Users/jz/code/scala/build/pack/lib/scala-library.jar,file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar,file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar,file:/Users/jz/code/scala/build/pack/lib/scalap.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/cldrdata.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/dnsns.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jaccess.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jfxrt.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/localedata.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/nashorn.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunec.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/zipfs.jar,file:/System/Library/Java/Extensions/MRJToolkit.jar,file:/Users/jz/code/scala/macro.jar] and parent being primordial classloader with boot classpath [/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/classes:/Users/jz/code/scala/build/pack/lib/jline.jar:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar:/Users/jz/code/scala/build/pack/lib/scala-library.jar:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar:/Users/jz/code/scala/build/pack/lib/scalap.jar]
successfully loaded macro impl as (class M$, public scala.reflect.api.Trees$LiteralApi M$.impl(scala.reflect.macros.blackbox.Context))
calculateUndetparams: Set()
performing macro expansion M.m at source-/private/tmp/a.scala,line-1,offset=15
context: MacroContext(m@source-/private/tmp/a.scala,line-1,offset=15 +0)
prefix: M
targs: List()
argss: List()
paramss: List()
binding: MacroImplBinding(false,true,M$,impl,List(List(Other)),List())
trees: List()
tags: List()
macroImplArgs: List()
macro impl
original:
()
Literal(Constant(()))
blackbox typecheck (against pt = ?): ((): Unit)
/code/scala on review/6446*
⚡ rm -rf macro.jar; qscalac -d macro.jar $(f 'import reflect.macros.blackbox._, language.experimental._; object M { def impl(c: Context) = {import c.universe._; println("macro impl");  q"()"}; def m: Unit = macro impl}') ; (java_use 1.8; ./build/pack/bin/scalac -Ymacro-debug-verbose -Ycache-macro-class-loader:last-modified -cp macro.jar:doesnotexist.jar $(f 'class Test { M.m }'))
macroExpand: expander = scala.tools.nsc.typechecker.Macros$DefMacroExpander@fad74ee, expandee = Select[1](Ident[2](M#6566), TermName("m")#7608)
[1] TypeRef(ThisType(scala#25), scala.Unit#1826, List())
[2] SingleType(ThisType(<empty>#3), M#6566), desugared = ()
looking for macro implementation: macro method m
resolving macro implementation as M$.impl (isBundle = false)
macro classloader: initializing from -cp: Vector(file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar, file:/Users/jz/code/scala/build/pack/lib/jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar, file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar, file:/Users/jz/code/scala/build/pack/lib/scala-library.jar, file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar, file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar, file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar, file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar, file:/Users/jz/code/scala/build/pack/lib/scalap.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/cldrdata.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/dnsns.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jaccess.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jfxrt.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/localedata.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/nashorn.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunec.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar, file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/zipfs.jar, file:/System/Library/Java/Extensions/MRJToolkit.jar, file:/Users/jz/code/scala/macro.jar)
classloader is: scala.reflect.internal.util.ScalaClassLoader$URLClassLoader@77e9807f of type class scala.reflect.internal.util.ScalaClassLoader$URLClassLoader with classpath [file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar,file:/Users/jz/code/scala/build/pack/lib/jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar,file:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar,file:/Users/jz/code/scala/build/pack/lib/scala-library.jar,file:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar,file:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar,file:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar,file:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar,file:/Users/jz/code/scala/build/pack/lib/scalap.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/cldrdata.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/dnsns.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jaccess.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/jfxrt.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/localedata.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/nashorn.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunec.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar,file:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/ext/zipfs.jar,file:/System/Library/Java/Extensions/MRJToolkit.jar,file:/Users/jz/code/scala/macro.jar] and parent being primordial classloader with boot classpath [/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/classes:/Users/jz/code/scala/build/pack/lib/jline.jar:/Users/jz/code/scala/build/pack/lib/scala-compiler-doc.jar:/Users/jz/code/scala/build/pack/lib/scala-compiler.jar:/Users/jz/code/scala/build/pack/lib/scala-library.jar:/Users/jz/code/scala/build/pack/lib/scala-reflect.jar:/Users/jz/code/scala/build/pack/lib/scala-repl-jline-embedded.jar:/Users/jz/code/scala/build/pack/lib/scala-repl-jline.jar:/Users/jz/code/scala/build/pack/lib/scala-swing_2.12-2.0.0.jar:/Users/jz/code/scala/build/pack/lib/scala-xml_2.12-1.0.6.jar:/Users/jz/code/scala/build/pack/lib/scalap.jar]
successfully loaded macro impl as (class M$, public scala.reflect.api.Trees$LiteralApi M$.impl(scala.reflect.macros.blackbox.Context))
calculateUndetparams: Set()
performing macro expansion M.m at source-/private/tmp/a.scala,line-1,offset=15
context: MacroContext(m@source-/private/tmp/a.scala,line-1,offset=15 +0)
prefix: M
targs: List()
argss: List()
paramss: List()
binding: MacroImplBinding(false,true,M$,impl,List(List(Other)),List())
trees: List()
tags: List()
macroImplArgs: List()
macro impl
original:
()
Literal(Constant(()))
blackbox typecheck (against pt = ?): ((): Unit)

@retronym retronym merged commit cb5f0fc into scala:2.12.x Mar 23, 2018

2 checks passed

cla @jvican signed the Scala CLA. Thanks!
Details
validate-main [432] SUCCESS. Took 41 min.
Details
@lrytz

This comment has been minimized.

Copy link
Member

lrytz commented Mar 23, 2018

Do I understand correctly that this means classloader caching won't work on Java >= 9? Then we should create a ticket to remember fixing that in 2.13.

@retronym

This comment has been minimized.

Copy link
Member

retronym commented Mar 23, 2018

Noted as a TODO in #6381 (comment)

@SethTisue SethTisue changed the title Don't compute `locations` in macroclassloader cache Make macros usable again on Java 9 & 10 Apr 26, 2018

@SethTisue SethTisue changed the title Make macros usable again on Java 9 & 10 Make macros usable again on Java 9 & 10, fixing 2.12.5 regression Apr 27, 2018

@SethTisue SethTisue changed the title Make macros usable again on Java 9 & 10, fixing 2.12.5 regression Make macros work again when compiling on Java 9 or 10, fixing 2.12.5 regression Apr 27, 2018

dvkndn added a commit to anduintransaction/design that referenced this pull request May 24, 2018

Upgrade to Scala 2.12.6
Avoid macro compilation issue with Java 10 scala/scala#6446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment