8000 Old version of guava is causing conflicts · Issue #379 · cjbooms/fabrikt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Old version of guava is causing conflicts #379

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

Closed
ethanmdavidson opened this issue Feb 25, 2025 · 3 comments · Fixed by #380
Closed

Old version of guava is causing conflicts #379

ethanmdavidson opened this issue Feb 25, 2025 · 3 comments · Fixed by #380

Comments

@ethanmdavidson
Copy link
Contributor
ethanmdavidson commented Feb 25, 2025

While trying to use the gradle plugin, I came across an issue caused by fabrikt having a transitive dependency on an old version of guava. See acanda/fabrikt-gradle-plugin#96

fabrikt has a transitive dependency on guava 18:

> ./gradlew dependencies --configuration=runtimeClasspath

<snip>

+--- com.reprezen.kaizen:openapi-parser:4.0.4
|    +--- com.reprezen.jsonoverlay:jsonoverlay:4.0.4
|    |    \--- org.eclipse.xtend:org.eclipse.xtend.lib:2.11.0
|    |         +--- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.11.0
|    |         |    \--- com.google.guava:guava:[14.0,19) -> 18.0

One way I've solved this before is by relocating the package so that both versions can coexist in the classpath. This is probably the most straightforward solution.

Another option is to upgrade org.eclipse.xtend.lib to the latest version, which depends on guava 33. This option doesn't seem so good because the reprezen dependencies seem to be unmaintained, and would probably need to be forked. There is a kotlin fork of the reprezen stuff which could be tried too. This is probably a better long-term plan, but not something I can commit to at this point.

I'll start putting together a PR for the package relocation, but wanted to open this issue for discussion in case you want to take a different route.

@cjbooms
Copy link
Owner
cjbooms commented Feb 25, 2025

Causing conflicts where? Fabrikt should not be on any runtime class paths.

@ethanmdavidson
Copy link
Contributor Author

The conflict is when fabrikt is used via the gradle plugin, alongside a plugin that depends on a newer version of guava. See this issue for details: acanda/fabrikt-gradle-plugin#96

If you don't want to accept this change it's fine, the workaround is to use the custom task, which is not too painful. However, I think it would be best if this issue was fixed, because when I ran into this issue it was not at all obvious what was wrong, and it took me a few hours to track it down. The symptom is that all gradle tasks start failing with the error java.lang.NoSuchMethodError: 'java.lang.Object com.google.common.util.concurrent.Futures.getDone(java.util.concurrent.Future)'. Figuring out which plugin(s) were causing the problem requires a lot of trial and error.

@cjbooms
Copy link
Owner
cjbooms commented Feb 25, 2025

No problem accepting PRs, was just curious. I'm following this on my phone so maybe missed some context. Will review PR later. Thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0