Skip to content

Scala reflection is broken in shaded JARs #350

@gehnaphore

Description

@gehnaphore

When packages get renamed during shading, no changes are made to any the ScalaSignature annotations in those JARs. The result is that Scala reflection will fail silently.

I imagine the fix would be to read and rewrite the ScalaSignature annotations along with the bytecode changes made by JarJar. It it easy enough to decode the signature using scalap and rewrite the annotation using ASM, but I didn't see any way to modify and re-pickle the signature without extracting pieces of scalac.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions