-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Should we use jarjar to repackage specific dependency versions #39
Comments
Guava and Joda tend to be pretty good with backward compatibility. |
One more point which I want to mention is that there may be some libraries (guava for an instance) that would actually benefit from sharing the same classes between user-code and the library (even though library does not expose them directly). e.g. ImmutableXXX.copyOf() would avoid the copy if it detects that the input is also an Immutable type. |
Not managing dependencies well becomes a real pain for application developers. Maven does provide some ways to mangle dependency versions but that does not work all the time due to, often unintentional, non-compatible changes. JarJar avoids this but with the penalty of multiple versions of the same functionality. It can also have issues with classes loaded by reflection e.g. from config files like the ServiceLoader. Java runtimes use a variety of ClassLoader tricks to try and provide isolation. For example, Tomcat uses a class shutter to prevent an application seeing its classes, or it can be configured with split ClassLoader trees. Most full-spec JavaEE containers (e.g. JBoss, Geronimo, Glassfish) have moved to using OSGI to isolate library jars. Java9 with Jigsaw gives us modules but is not baked yet. There are a few things we can do to simplify this problem:
Our standard runtime(s) would support a specific profile, make all the user-facing API classes visible to the application from the (Java) container's ClassLoader (i.e. from Jetty or Tomcat's public "lib" directory), and hide the implementation classes and dependencies using JarJar rewriting and ClassLoader tricks. The user's web-application would reference the APIs as "provided" dependencies and not be impacted by how we implemented the stubs. When building a custom runtime, the runtime's creator would define the profile they wanted to expose to their applications and set up the ClassLoader to match using the same techniques. Basically, we'd provide fine-grained building blocks that allow a user to set up the class-path they want, along with pre-assembled profiles for the most common cases. |
We don't have any imminent plans for this. I'm going to close this out now. |
* chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: googleapis/synthtool@fa54eb2 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906
…-info-reports-plugin to v3.4.0 (#39) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) ([source](https://togithub.com/apache/maven-project-info-reports-plugin)) | `3.3.0` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-gke-multi-cloud). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMTcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjExNy40In0=-->
…cies to v3.0.1 (#39) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-shared-dependencies</summary> ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-gke-backup). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMzUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEzNS4xIn0=-->
🤖 I have created a release *beep* *boop* --- ## [0.2.2](googleapis/java-gke-backup@v0.2.1...v0.2.2) (2022-08-09) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#37](googleapis/java-gke-backup#37)) ([a1a8175](googleapis/java-gke-backup@a1a8175)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#39](googleapis/java-gke-backup#39)) ([18a7dc2](googleapis/java-gke-backup@18a7dc2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…39) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 471585446 Source-Link: googleapis/googleapis@e1b54cd Source-Link: https://github.com/googleapis/googleapis-gen/commit/5cf9f3d16d4414508889245a7ac5ae36f4d886ee Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWNmOWYzZDE2ZDQ0MTQ1MDg4ODkyNDVhN2FjNWFlMzZmNGQ4ODZlZSJ9
…1575) (#39) Source-Link: googleapis/synthtool@2e9ac19 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
🤖 I have created a release *beep* *boop* --- ## [0.3.1](https://togithub.com/googleapis/java-apigee-registry/compare/v0.3.0...v0.3.1) (2022-10-03) ### Bug Fixes * Additional error codes added to service configuration for retry ([#39](https://togithub.com/googleapis/java-apigee-registry/issues/39)) ([55a9b41](https://togithub.com/googleapis/java-apigee-registry/commit/55a9b417cf04575d2070ad026e5648a494fe076a)) ### Dependencies * Update dependency certifi to v2022.9.24 ([#48](https://togithub.com/googleapis/java-apigee-registry/issues/48)) ([1c6ae70](https://togithub.com/googleapis/java-apigee-registry/commit/1c6ae70cb9ff9e7e98d83ce472ae5526d08f9a35)) * Update dependency charset-normalizer to v2.1.1 ([#53](https://togithub.com/googleapis/java-apigee-registry/issues/53)) ([2130079](https://togithub.com/googleapis/java-apigee-registry/commit/21300793a908ed41c535813ee15ec94b5f5ef018)) * Update dependency click to v8.1.3 ([#54](https://togithub.com/googleapis/java-apigee-registry/issues/54)) ([cf3458b](https://togithub.com/googleapis/java-apigee-registry/commit/cf3458bd2972f3db75c8cbf834be0b383d9e74a0)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#42](https://togithub.com/googleapis/java-apigee-registry/issues/42)) ([38cb4f9](https://togithub.com/googleapis/java-apigee-registry/commit/38cb4f9932c3d6cb4c36d3f61922fd613409607f)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#44](https://togithub.com/googleapis/java-apigee-registry/issues/44)) ([ddaed09](https://togithub.com/googleapis/java-apigee-registry/commit/ddaed0964ae57cd7b799b9acf7b202595af4c781)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#65](https://togithub.com/googleapis/java-apigee-registry/issues/65)) ([882e36b](https://togithub.com/googleapis/java-apigee-registry/commit/882e36b2d21ff601f569aa79dfe840cd41bf0438)) * Update dependency gcp-releasetool to v1.8.8 ([#49](https://togithub.com/googleapis/java-apigee-registry/issues/49)) ([3a927a3](https://togithub.com/googleapis/java-apigee-registry/commit/3a927a3df5a8cf5cfff79faede5387291a3d443e)) * Update dependency google-api-core to v2.10.1 ([#55](https://togithub.com/googleapis/java-apigee-registry/issues/55)) ([f841a07](https://togithub.com/googleapis/java-apigee-registry/commit/f841a07c0b1c2fa585f7e665208d6a6b7843c75c)) * Update dependency google-auth to v2.11.1 ([#50](https://togithub.com/googleapis/java-apigee-registry/issues/50)) ([7b450cb](https://togithub.com/googleapis/java-apigee-registry/commit/7b450cbeadc08b8dc26fbd4738ce47788a5cf330)) * Update dependency google-cloud-core to v2.3.2 ([#51](https://togithub.com/googleapis/java-apigee-registry/issues/51)) ([b7f1110](https://togithub.com/googleapis/java-apigee-registry/commit/b7f111014416ff76fa787085d0d0bc9ab47f9af6)) * Update dependency google-cloud-storage to v2.5.0 ([#56](https://togithub.com/googleapis/java-apigee-registry/issues/56)) ([f3799d3](https://togithub.com/googleapis/java-apigee-registry/commit/f3799d3d2d754ec89c784655d835ecaed4df3406)) * Update dependency google-crc32c to v1.5.0 ([#57](https://togithub.com/googleapis/java-apigee-registry/issues/57)) ([b978c7d](https://togithub.com/googleapis/java-apigee-registry/commit/b978c7d2bed23554998a9f0f047e7211ff37f906)) * Update dependency googleapis-common-protos to v1.56.4 ([#52](https://togithub.com/googleapis/java-apigee-registry/issues/52)) ([9e069f1](https://togithub.com/googleapis/java-apigee-registry/commit/9e069f1d96c78fdaedbf57a95d05ada18d57ea0f)) * Update dependency importlib-metadata to v4.12.0 ([#58](https://togithub.com/googleapis/java-apigee-registry/issues/58)) ([370bd1e](https://togithub.com/googleapis/java-apigee-registry/commit/370bd1eba82d820fe7156c276ee5e4a5cbf3f9e0)) * Update dependency jeepney to v0.8.0 ([#59](https://togithub.com/googleapis/java-apigee-registry/issues/59)) ([7a63034](https://togithub.com/googleapis/java-apigee-registry/commit/7a63034a2a194feed6dc7e8215c5063ad1454072)) * Update dependency jinja2 to v3.1.2 ([#60](https://togithub.com/googleapis/java-apigee-registry/issues/60)) ([4fe2b85](https://togithub.com/googleapis/java-apigee-registry/commit/4fe2b853af3c39d2c46efbdc5027cc34945a736c)) * Update dependency keyring to v23.9.3 ([#61](https://togithub.com/googleapis/java-apigee-registry/issues/61)) ([c8cf1c2](https://togithub.com/googleapis/java-apigee-registry/commit/c8cf1c29cab75b18ab67e372bf3d50b36a4b57e9)) * Update dependency markupsafe to v2.1.1 ([#62](https://togithub.com/googleapis/java-apigee-registry/issues/62)) ([98036ae](https://togithub.com/googleapis/java-apigee-registry/commit/98036ae98fa56eba73cccb88a2af726d20fb2a1d)) * Update dependency protobuf to v3.20.2 ([#63](https://togithub.com/googleapis/java-apigee-registry/issues/63)) ([aa9f0e7](https://togithub.com/googleapis/java-apigee-registry/commit/aa9f0e7cad3940fa02cd69c3b3c3e8c2938e0c1b)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.1.3](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/compare/v0.1.2...v0.1.3) (2022-10-03) ### Dependencies * Update dependency cachetools to v5 ([#46](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/46)) ([1e6735e](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/1e6735e41277aa976822811b2c22476181f708f0)) * Update dependency certifi to v2022.9.24 ([#25](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/25)) ([3b9b8aa](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/3b9b8aa1594ec7c1de1908a3127aff5f396bab39)) * Update dependency charset-normalizer to v2.1.1 ([#29](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/29)) ([4a3a828](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/4a3a828f40e6f68eff4f7e88fb8b181d8ecc1c59)) * Update dependency click to v8.1.3 ([#31](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/31)) ([d80efdb](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/d80efdb42d2f46fb986c6b9bd11f06b190641d4e)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#50](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/50)) ([75bf58d](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/75bf58d798d5a0c71fa6c63a435d133b7891cd0d)) * Update dependency gcp-releasetool to v1.8.8 ([#26](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/26)) ([8a9177f](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/8a9177f6d7fa2e4f9d4d856b6525805050062fc0)) * Update dependency google-api-core to v2.10.1 ([#32](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/32)) ([26a3505](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/26a3505f3d4fb399eee74369f7549491c5dbc96b)) * Update dependency google-auth to v2.12.0 ([#33](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/33)) ([2ec1a53](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/2ec1a536fbfe801a1cdfcd8a86846c185e71021c)) * Update dependency google-cloud-core to v2.3.2 ([#27](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/27)) ([7c89e4e](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/7c89e4e6a0dba51a9c927e7202b7ad98aa4d5939)) * Update dependency google-cloud-storage to v2.5.0 ([#34](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/34)) ([dafdb14](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/dafdb14eb19ebe242b8dda14e2f571692019fd19)) * Update dependency googleapis-common-protos to v1.56.4 ([#28](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/28)) ([639d08f](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/639d08f0f64ebe5b77eb57bb01a13beaece510e7)) * Update dependency importlib-metadata to v4.12.0 ([#36](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/36)) ([015498c](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/015498c4c895c2c6a232664aab321825e3c579e9)) * Update dependency keyring to v23.9.3 ([#39](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/39)) ([516e8d0](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/516e8d0e1a894d3c341e4706dcdf9a95c6196ee1)) * Update dependency markupsafe to v2.1.1 ([#40](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/40)) ([cc83a35](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/cc83a35082fafc720d864e6e4f92a32d60966619)) * Update dependency protobuf to v3.20.2 ([#41](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/41)) ([7f03dc0](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/7f03dc0a024d8a4d845f38d0ac515f07a5c11fb8)) * Update dependency protobuf to v4 ([#47](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/47)) ([291e576](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/291e5760e8d6d52cb8be03c80a2b3c6a1e60c590)) * Update dependency pyjwt to v2.5.0 ([#42](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/42)) ([f15a0dc](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/f15a0dcb0d2e097a8fd778a0c8dcb180dc2586ea)) * Update dependency requests to v2.28.1 ([#43](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/43)) ([125b1ea](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/125b1ea84d4bfc7f8976b2274cd7f0f26fbdcf28)) * Update dependency typing-extensions to v4.3.0 ([#44](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/44)) ([8fb2625](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/8fb26256d4c4c4f9f5dd4947282f88e55ce9345e)) * Update dependency zipp to v3.8.1 ([#45](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/issues/45)) ([6f0398b](https://togithub.com/googleapis/java-beyondcorp-clientconnectorservices/commit/6f0398b2bd7967356a475d1764dec464b7788038)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
I did a simple java main Maven project.
I see many dependencies in my project jars, for example guava 18, httpclient401,jodatime27 etc...
If I wand to use for my other application logic guava 12 or 25 for whatever reasons, we will have a version conflict...
JarJar processing? How is it done for other runtimes? Seems to be a generic Veneer issue.
The text was updated successfully, but these errors were encountered: