scalamacros / paradise

(No longer actively maintained.)
http://scalamacros.org/
BSD 3-Clause "New" or "Revised" License
158 stars 53 forks source link

with latest 2.12.1 nightly, "class scala.IndexOutOfBoundsException not found" #88

Closed SethTisue closed 7 years ago

SethTisue commented 7 years ago

this was found by the Scala 2.12 community build, but can be reproduced independently, on the 2.12.0 branch of paradise, with:

++2.12.1-de003f7-nightly
set every scalaBinaryVersion := "2.12"
tests/test

resulting in a lot of repeated errors like:

[error] /Users/tisue/paradise/tests/src/test/scala/annotations/run/KaseIdentityObject.scala:54: exception during macro expansion: 
[error] scala.ScalaReflectionException: class scala.IndexOutOfBoundsException not found.
[error]     at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:122)
[error]     at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:22)
[error]     at kaseMacro$kaseObjectHelper.expand(kase.scala:264)
[error]     at kaseMacro$.impl(kase.scala:303)
[error]     at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[error]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error]     at java.lang.reflect.Method.invoke(Method.java:498)
[error]     at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$4(JavaReflectionRuntimes.scala:34)
[error]     at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime$(Macros.scala:772)
[error]     at scala.tools.nsc.Global$$anon$1.macroExpandWithRuntime(Global.scala:424)
[error]     @kase object CPostLocalPostcomp
[error]      ^
SethTisue commented 7 years ago

@xeno-by are you available to look at this? if this is an issue for Scala 2.12.1, we'll need to know soon. also, this is making every 2.12.x Scala community build fail.

xeno-by commented 7 years ago

I will do that tomorrow. Been travelling the last week.

xeno-by commented 7 years ago

@SethTisue @adriaanm What resolver should I use?

[error] (paradise/*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-compiler;2.12.1-de003f7-nightly: not found
[error] unresolved dependency: org.scala-lang#scala-library;2.12.1-de003f7-nightly: not found
[error] unresolved dependency: org.scala-lang#scala-reflect;2.12.1-de003f7-nightly: not found
[error] (tests/*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-compiler;2.12.1-de003f7-nightly: not found
[error] unresolved dependency: org.scala-lang#scala-library;2.12.1-de003f7-nightly: not found
[error] unresolved dependency: org.scala-lang#scala-reflect;2.12.1-de003f7-nightly: not found
[error] Total time: 4 s, completed Nov 13, 2016 1:45:01 PM
SethTisue commented 7 years ago

What resolver should I use?

resolvers += "release-temp" at "https://scala-ci.typesafe.com/artifactory/scala-release-temp/"
SethTisue commented 7 years ago

I noticed I was answering this question a lot, so: http://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-to-use-a-nightly-build-of-scala-2-11-or-2-12

xeno-by commented 7 years ago

Can reproduce. Will investigate now.

xeno-by commented 7 years ago

It turns out that paradise itself is fine.

It's the code of the test macro that changed behavior. After I fixed the test, everything became green again. See https://github.com/scalamacros/paradise/commit/a976e750e15078fb19f0007b1d1c64e6acb6da87 for more information.

SethTisue commented 7 years ago

thanks Eugene! looking good over at https://github.com/scala/community-builds/pull/404