jarjar
jarjar copied to clipboard
Wildcard.java prevents renaming bad package specs to valid package specs
When used from sbt-assembly, an attempt to shade the classes in a jar with a bad package namespace to a valid namespace fails during initialization of the Wildcard instance. E.g. ShadeRule.rename("org.spark-project.jetty.**" -> "shaded.jetty.@1").inAll
Specifically, the spark team has shaded the jetty package namespace into org.spark-project.jetty.* and any attempt to shade that into another namespace fails in the check on line 39. If that check is bypassed, then it will fail in getMatcher() on line 113.
The correct solution is to ignore the package specification of the source pattern and only the check the result as mentioned in the TODO on line 51
Thanks for the report. Do you have time submit a PR for it?
On May 2, 2017 5:21 PM, "LathamKing" [email protected] wrote:
When used from sbt-assembly, an attempt to shade the classes in a jar with a bad package namespace to a valid namespace fails during initialization of the Wildcard instance. E.g. ShadeRule.rename("org.spark-project.**" -> "shadeio.@1 https://github.com/1").inAll
Specifically, the spark team has shaded the jetty package namespace into org.spark-project.jetty.* and any attempt to shade that into another namespace fails in the check on line 39. If that check is bypassed, then it will fail in getMatcher() on line 113.
The correct solution is to ignore the package specification of the source pattern and only the check the result as mentioned in the TODO on line 51
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pantsbuild/jarjar/issues/28, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC2lL_N6P7i8_gZt9FysYFsqes9DiNoks5r18iggaJpZM4NO10D .