Repository navigation
Shading often corrupts non-code metadata in META-INF/MANIFEST.mf #1762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,9 +22,10 @@ There are a number of problems with shading: | |
| to also roll in the security fix). | ||
| - Shading cannot be performed on types used in a library's own public API as return | ||
| types or method arguments. | ||
| - Service entries under `META-INF/services` can easily be messed up. They need | ||
| special effort to be merged because the entries are located in the same place | ||
| for every jar. | ||
| - Shading often corrupts non-code metadata in META-INF/MANIFEST.mf and other locations. | ||
| For instance, service entries under `META-INF/services` are hard | ||
| to merge because the entries are located in the same place | ||
| for every JAR file. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (minor) Not every JAR file has
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's one example of the sorts of problems that can happen. Not every shading will have this problem, or indeed any problem with metadata, but it can crop up. |
||
| - Shading doesn't relocate JNI code. | ||
| - Shaders either don't support classes loaded by reflection or they replace all | ||
| strings matching selected packages in the bytecode, leading to the corruption | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.