google / google/closure-compiler

Properly shade com.google.code.gson:gson

Open
#3,523 1 comment 1 reaction 1 assignee Claimed by @brad4d View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

The "shaded" JAR of closure-compiler includes all the classes in `com.google.gson` without shading (renaming). This can lead to confusing errors far downstream - for example, I came upon this issue when [sbt-dependency-check](https://github.com/albuch/sbt-dependency-check) raised a `NoMethodError`, which turned out to be caused by my project using [scala-js](https://github.com/scala-js/scala-js). I am [definitely](https://github.com/google/closure-compiler/issues/2815) [not](https://github.com/google/closure-compiler/issues/2562) [the first](https://github.com/google/closure-compiler/issues/2120) one to experience this.

Is there a reason why `com.google.gson` is bundled rather than shaded? What is the "preferred" way to deal with such problems downstream?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.