-
Notifications
You must be signed in to change notification settings - Fork 171
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
Bouncy Castle dependency is not shaded in Java 9+ #1193
Comments
After Snowflake Support indicated that It turns out that the To use the
So that causes two problems in Java 9+:
Basically, the shading just seems to be incomplete as it hasn't taken in to account the multi-release nature of Bouncy castle. |
We see the following error with https://mvnrepository.com/artifact/net.snowflake/snowflake-jdbc/3.14.5 (using docker.io/library/eclipse-temurin:11.0.21_9-jre-alpine and building our project using Clojure 1.11.1.1413):
Could this be a regression or is this more likely caused by how we build our project? |
It appears that starting with version 3.13.19, the
org.bouncycastle
dependency bundled inside the Snowflake JDBC driver.jar
is no longer being shaded.This is causing problems for our applications which have a dependency on both the Snowflake JDBC driver and a direct dependency on Bouncy Castle, as now those applications are including two copies of Bouncy Castle. Our build pipeline enforces the one version rule and our applications will not build while this conflict exists, so we're blocked from upgrading beyond 3.13.18.
We've been down this road before, when the Snowflake JDBC driver didn't shade a JNI library (I forget which one exactly, it was a while ago), which also blocked our upgrade for a while until that dependency was removed.
I am aware that this ticket is in opposition to #608 (JDBC driver should not be shade/relocate Bouncycastle), and that ticket may be why Bouncy Castle stopped being shaded! But even the requestor of that ticket acknowledged that unshaded dependencies cause their own problems.
Personally, I think Snowflake has to pick a lane here. Either provide a fat jar and shade every single dependency, or provide a skinny jar which allows clients to manage dependencies like regular Java libraries do (what #174 calls for). Or provide both. Trying to pick a middle lane where only a fat-jar is provided, but which doesn't shade all dependencies, just causes problems.
The text was updated successfully, but these errors were encountered: