Fix class duplicates
See original GitHub issueI’m using pureconfig v0.14.0
. Running pantsbuild (v1.30.0) detect-duplicates
multiple duplicates are detected:
$ ./pants detect-duplicates src/scala/myapp:main
...
[detect-duplicates]
===== For target JvmBinary(src/scala/com/eslgaming/services/gamehub/http4s_poc:main):
Duplicate classes and/or resources detected in artifacts: ('com.github.pureconfig-pureconfig-core_2.12-0.14.0.jar', 'com.github.pureconfig-pureconfig-macros_2.12-0.14.0.jar')
pureconfig/DerivationMacros$$anon$5.class
pureconfig/derivation/LazyContextParser.class
pureconfig/DerivationMacros$$typecreator2$1.class
pureconfig/DerivationMacros$$anon$1.class
pureconfig/derivation/LazyContextParser$LazyContext$.class
pureconfig/DerivationMacros$$anonfun$$nestedInanonfun$buildImplicitNotFound$1$1.class
pureconfig/Derivation$Successful$.class
pureconfig/derivation/LazyContextParser$LazyContextTree$$anon$2.class
pureconfig/derivation/MacroCompat$$typecreator1$1.class
pureconfig/Derivation$Successful.class
... 20 more ...
Duplicate classes and/or resources detected in artifacts: ('com.github.pureconfig-pureconfig-generic-base_2.12-0.14.0.jar', 'com.github.pureconfig-pureconfig-generic_2.12-0.14.0.jar')
pureconfig/generic/CoproductHint$Attempt$.class
pureconfig/generic/CoproductHint$Use$.class
pureconfig/generic/error/CoproductHintException$.class
pureconfig/generic/ProductHint$Use.class
pureconfig/generic/ProductHint$Action.class
pureconfig/generic/ProductHint$UseOrDefault.class
pureconfig/generic/ProductHint$UseOrDefault$.class
pureconfig/generic/error/NoValidCoproductOptionFound$.class
pureconfig/generic/ProductHint$Use$.class
pureconfig/generic/ProductHintImpl.class
... 18 more ...
Unfortunately, I cannot create a fat-jar if I have this kind of duplicates.
This issue is related to https://github.com/pureconfig/pureconfig/issues/430. Also reported in https://github.com/pantsbuild/pants/issues/11488.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Android Studio: Resolving Duplicate Classes - gradle
Delete files with duplicate jar extensions in the libs folder. However, if there are no duplicate files and ...
Read more >Duplicate class error. Fixed - YouTube
How to fix a Duplicate class error in android studio.This error occurs when the Android Plugin can't decide which class to use when...
Read more >How to fix Duplicate class error in android studio. - YouTube
CodingTony fixing android studio problems, So as usual watch a video to see a simple solution how to solve this error " Duplicate...
Read more >Duplicate classes in managed assets can cause issues ... - IBM
To resolve the issue, you need to find the duplicate class and remove it. Check all of the managed asset JAR files for...
Read more >Duplicate class - CommonsWare
You can try choosing one of those two artifacts and using exclude to block the other one. The good news is that this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sentenza Just to be explicit, this issue should be fixed. That said, we haven’t published a release with the fix, yet.
That’s a good insight @leifwickland, thanks for sharing! I guess it makes me a bit more comfortable removing OSGi support knowing that popular libraries did it too and got no complaints.
I know @jcazevedo is also on board with this, so I’ll open a PR to do it.