René's URL Explorer Experiment


Title: When graphql-java 17.x is an implementation dependency of a gradle project, it pulls in guava. · Issue #2540 · graphql-java/graphql-java · GitHub

Open Graph Title: When graphql-java 17.x is an implementation dependency of a gradle project, it pulls in guava. · Issue #2540 · graphql-java/graphql-java

X Title: When graphql-java 17.x is an implementation dependency of a gradle project, it pulls in guava. · Issue #2540 · graphql-java/graphql-java

Description: Describe the bug It appears that graphql-java is not supposed to have a runtime dependency on Guava, because the main jar artifact is an output of shadowJar, which embeds guava underneath the graphql package namespace. And indeed, guava ...

Open Graph Description: Describe the bug It appears that graphql-java is not supposed to have a runtime dependency on Guava, because the main jar artifact is an output of shadowJar, which embeds guava underneath the graph...

X Description: Describe the bug It appears that graphql-java is not supposed to have a runtime dependency on Guava, because the main jar artifact is an output of shadowJar, which embeds guava underneath the graph...

Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2540

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"When graphql-java 17.x is an implementation dependency of a gradle project, it pulls in guava.","articleBody":"**Describe the bug**\r\nIt appears that graphql-java is not supposed to have a runtime dependency on Guava, because the main jar artifact is an output of shadowJar, which embeds guava underneath the graphql package namespace. And indeed, guava is not listed as a dependency in the pom. And yet, when you build a project using gradle to depend on graphql-java 17.x, guava (and several of its dependencies) are pulled into its dependency graph.\r\n\r\nThis appears to be because gradle will prefer the data in the generated graphql-java-17.2.module file, being directed to do so by a comment in the pom. The pom has its guava dependency edited out in build, but the .module file is unchanged.\r\n\r\nThis probably applies to antlr4 as well. (I think antlr4-runtime is supposed to be there but not plain antlr4?)\r\n\r\nThis did not occur with graphql 16.2. It appears it starts with 17.0, and continues with 17.2.\r\n\r\n**To Reproduce**\r\nAttached is a trivial gradle project called `graphql-depender` because all it does is depend on graphql-java. It's made by creating a default gradle java application project (using gradle init), editing build.gradle and removing the default guava dependency and adding an implementation dependency on graphl-java 17.2, in the form:\r\n\r\n```\r\n    implementation 'com.graphql-java:graphql-java:17.2'\r\n```\r\n\r\n[graphql-depender.tar.gz](https://github.com/graphql-java/graphql-java/files/7120661/graphql-depender.tar.gz)\r\n\r\nUnpack the jar, and run:\r\n\r\n```\r\n./gradlew installDist\r\n```\r\n\r\nYou will see that `app/build/install/app/lib` contains a number of jars, including guava and its dependencies.\r\n\r\nShow the dependency tree:\r\n\r\n```\r\n./gradlew --console=plain  app:dependencies --configuration runtimeClasspath\r\n\r\n\u003e Task :app:dependencies\r\n\r\n------------------------------------------------------------\r\nProject ':app'\r\n------------------------------------------------------------\r\n\r\nruntimeClasspath - Runtime classpath of source set 'main'.\r\n\\--- com.graphql-java:graphql-java:17.2\r\n     +--- org.antlr:antlr4-runtime:4.9.2\r\n     +--- org.slf4j:slf4j-api:1.7.30\r\n     +--- com.google.guava:guava:30.0-jre\r\n     |    +--- com.google.guava:failureaccess:1.0.1\r\n     |    +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava\r\n     |    +--- com.google.code.findbugs:jsr305:3.0.2\r\n     |    +--- org.checkerframework:checker-qual:3.5.0\r\n     |    +--- com.google.errorprone:error_prone_annotations:2.3.4\r\n     |    \\--- com.google.j2objc:j2objc-annotations:1.3\r\n     +--- com.graphql-java:java-dataloader:3.1.0\r\n     |    \\--- org.slf4j:slf4j-api:1.7.30\r\n     +--- org.reactivestreams:reactive-streams:1.0.2\r\n     \\--- org.antlr:antlr4:4.9.2\r\n          +--- org.antlr:antlr4-runtime:4.9.2\r\n          +--- org.antlr:antlr-runtime:3.5.2\r\n          +--- org.antlr:ST4:4.3\r\n          |    \\--- org.antlr:antlr-runtime:3.5.2\r\n          +--- org.abego.treelayout:org.abego.treelayout.core:1.0.3\r\n          +--- org.glassfish:javax.json:1.0.4\r\n          \\--- com.ibm.icu:icu4j:61.1\r\n\r\n(*) - dependencies omitted (listed previously)\r\n\r\nA web-based, searchable dependency report is available by adding the --scan option.\r\n\r\nBUILD SUCCESSFUL in 468ms\r\n1 actionable task: 1 executed\r\n```\r\n\r\n**Workaround**\r\n\r\nI have a workaround, which I'm not entirely sure is correct, which is to exclude the transitive dependencies I don't want (ie: don't think are really required) in the dependency declaration like this:\r\n\r\n```\r\n    implementation('com.graphql-java:graphql-java:17.2') {\r\n        exclude group: 'com.google.guava'\r\n        exclude group: 'org.antlr', module: 'antlr4'\r\n    }\r\n```\r\n\r\nThis appears to work:\r\n\r\n```\r\n./gradlew --console=plain  app:dependencies --configuration runtimeClasspath\r\n\r\n\u003e Task :app:dependencies\r\n\r\n------------------------------------------------------------\r\nProject ':app'\r\n------------------------------------------------------------\r\n\r\nruntimeClasspath - Runtime classpath of source set 'main'.\r\n\\--- com.graphql-java:graphql-java:17.2\r\n     +--- org.antlr:antlr4-runtime:4.9.2\r\n     +--- org.slf4j:slf4j-api:1.7.30\r\n     +--- com.graphql-java:java-dataloader:3.1.0\r\n     |    \\--- org.slf4j:slf4j-api:1.7.30\r\n     \\--- org.reactivestreams:reactive-streams:1.0.2\r\n\r\n(*) - dependencies omitted (listed previously)\r\n\r\nA web-based, searchable dependency report is available by adding the --scan option.\r\n\r\nBUILD SUCCESSFUL in 558ms\r\n1 actionable task: 1 executed\r\n```\r\n","author":{"url":"https://github.com/StrangeNoises","@type":"Person","name":"StrangeNoises"},"datePublished":"2021-09-07T10:24:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/2540/graphql-java/issues/2540"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9dce9c79-4e95-9515-6657-be386fa60749
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD090:2AB1FC:301340F:4572A87:6A60EEC5
html-safe-nonce7d6a58387bae2f9a6920a213958220f2d69db081780c721106b57bd0f00f37be
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDkwOjJBQjFGQzozMDEzNDBGOjQ1NzJBODc6NkE2MEVFQzUiLCJ2aXNpdG9yX2lkIjoiMjg5NDg1OTc2NTE4NDI2MTgyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9e5343bd28a58ab6fa4613299620c84c6992becad003342606a54f7f7a703078
hovercard-subject-tagissue:989833352
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/2540/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7933fcf7d41198c4f05d684f2f8742acdc294f2804695c461a6c8f359f9fa0bd/graphql-java/graphql-java/issues/2540
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7933fcf7d41198c4f05d684f2f8742acdc294f2804695c461a6c8f359f9fa0bd/graphql-java/graphql-java/issues/2540
og:image:altDescribe the bug It appears that graphql-java is not supposed to have a runtime dependency on Guava, because the main jar artifact is an output of shadowJar, which embeds guava underneath the graph...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameStrangeNoises
hostnamegithub.com
expected-hostnamegithub.com
None3ba36a464b9464992131f4003292a219fc87f92404b0dbe3fd1ef07f11102d0f
turbo-cache-controlno-preview
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2cc5e4f897a27632dd600edfec4c737bea2f8338
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/issues/2540#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2540
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2540
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/issues/2540
Reloadhttps://github.com/graphql-java/graphql-java/issues/2540
Reloadhttps://github.com/graphql-java/graphql-java/issues/2540
Please reload this pagehttps://github.com/graphql-java/graphql-java/issues/2540
graphql-java https://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Notifications https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Fork 1.1k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Star 6.2k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Code https://github.com/graphql-java/graphql-java
Issues 26 https://github.com/graphql-java/graphql-java/issues
Pull requests 11 https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality 0 https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Code https://github.com/graphql-java/graphql-java
Issues https://github.com/graphql-java/graphql-java/issues
Pull requests https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
#2586https://github.com/graphql-java/graphql-java/pull/2586
When graphql-java 17.x is an implementation dependency of a gradle project, it pulls in guava.https://github.com/graphql-java/graphql-java/issues/2540#top
#2586https://github.com/graphql-java/graphql-java/pull/2586
https://github.com/StrangeNoises
StrangeNoiseshttps://github.com/StrangeNoises
on Sep 7, 2021https://github.com/graphql-java/graphql-java/issues/2540#issue-989833352
graphql-depender.tar.gzhttps://github.com/graphql-java/graphql-java/files/7120661/graphql-depender.tar.gz
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.