launchdarkly/java-server-sdk

Provide an unshaded SDK

tandr opened this issue · 4 comments

tandr commented

Is your feature request related to a problem? Please describe.
We have a server app that uses dropwizard, jackson and whole lot of other libraries. We cannot register LaunchDarkly with our jackson's ObjectMapper because LDJackson.module() returns a shaded version of the Jackson's Module class.

Describe the solution you'd like
An SDK flavour without any shaded libraries would be welcome.

Describe alternatives you've considered

  1. Copy LDJackson class verbatim and replace references.
  2. Write config serialization ourselves.

That sounds like a build error that we should fix. The whole point of that method was to provide a usable integration with Jackson that is not affected by shading. There is logic in the build script specifically to enable that, and logic in the CI tests to verify that it is actually usable in a project that imports the shaded jar, so apparently something is wrong with both of those and we'll look into it.

However, I should point out that there already is an SDK distribution that does not contain embedded shaded libraries. To get that artifact, you would use the thin classifier as described in the project readme.

tandr commented

Thank you for the quick reply. I was not the original integrator of the library, and missed readme's note about -thin client. I will try to see what could be done on that front.

Well, indeed this was a simple mistake in the build, and the mystery of why our CI tests didn't detect this isn't really a mystery: the CI tests covered the Gson integration but didn't cover the Jackson integration at all (at least, not from the point of view of application code using the shaded jar). That's embarrassing. We should be able to release a patch for this pretty soon.

We've released version 5.1.1, which should fix this.