object ScalaReflectWorkaround
a workaround for a scala reflect bug, where the first invocation of scala reflect fails idea: invoke this at the very start to trigger the bug. future invocations should be fine i asked to move the retry logic into scala reflect as a better way to handle this https://github.com/scala/bug/issues/12038#issuecomment-760629585
AMMENDMENT: Actually doing this once is not always enough. Not sure why this is the case but if the fact reflection has happened "long enough" before the intend reflections, the bug can again be triggered. This was just hidden by the fact that the tests got executed in a forked process, effectively always resetting the "already worked around" flag. So we we now do this any time workaroundScalaReflectBugByTriggeringReflection() is called and should be fine. AND ALWAYS REMEMBER: Global state is the root of all evil.
to reproduce the issue, comment out this workaround, publish cpg locally and run the following in the codescience repo:
cpg2sp/testOnly *PolicyAmmoniteExecutorTest
if the above is green without this workaround, we don't need it any more
- Alphabetic
- By Inheritance
- ScalaReflectWorkaround
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromJava(t: FileDescriptorProto): Unit
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def workaroundScalaReflectBugByTriggeringReflection(): Any