You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/06 23:49:42 UTC

[GitHub] [pulsar] hansenc opened a new issue #6902: Jackson shading issues

hansenc opened a new issue #6902:
URL: https://github.com/apache/pulsar/issues/6902


   **Is your feature request related to a problem? Please describe.**
   `pulsar-client`, the Pulsar Java client, shades several of its dependencies and redistributes them in its jar, which makes sense to do. However, shading Jackson in this way leads to behavior that is surprising to new users (see #6842 for one example). Another example is that the shaded Jackson will not pick up `com.fasterxml.jackson.annotation.*` annotations, instead looking for `org.apache.pulsar.shade.com.fasterxml.jackson.annotation.*` annotations which limits users' ability to reuse existing classes.
   
   **Describe the solution you'd like**
   - Don't shade Jackson in `pulsar-client` and instead make Jackson an optional Maven dependency for the Java client (both `pulsar-client` and `pulsar-client-original`) since users may not need the JSON schema at all (unless it's needed internally in the client for some reason). Users needing the JSON schema will need to provide their own (compatible) version of Jackson, which eliminates the need for shading.
   - Mention shading in [the Pulsar Java client documentation](https://pulsar.apache.org/docs/en/client-libraries-java/) and list `pulsar-client-original` there as the unshaded artifact.
   - Consider renaming `pulsar-client` to `pulsar-client-shaded` for clarity. I've seen some other projects do this (https://github.com/rickfast/consul-client is one example).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijie commented on issue #6902: Jackson shading issues

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6902:
URL: https://github.com/apache/pulsar/issues/6902#issuecomment-624982506


   This issue seems to be related to issue #6889 as well.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org