Skip to content
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

duplicate scala/annotation/nowarn.class with different file contents #520

Closed
jakeonfire opened this issue Feb 4, 2022 · 2 comments
Closed

Comments

@jakeonfire
Copy link

getting the following errors:

[error] 2 errors were encountered during merge
[error] java.lang.RuntimeException: deduplicate: different file contents found in the following:
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.4.4/scala-collection-compat_2.12-2.4.4.jar:scala/annotation/nowarn$.class
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.13/scala-library-2.12.13.jar:scala/annotation/nowarn$.class
[error] deduplicate: different file contents found in the following:
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.4.4/scala-collection-compat_2.12-2.4.4.jar:scala/annotation/nowarn.class
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.13/scala-library-2.12.13.jar:scala/annotation/nowarn.class
[error] 	at sbtassembly.Assembly$.applyStrategies(Assembly.scala:203)
[error] 	at sbtassembly.Assembly$.x$1$lzycompute$1(Assembly.scala:47)
[error] 	at sbtassembly.Assembly$.x$1$1(Assembly.scala:45)
[error] 	at sbtassembly.Assembly$.stratMapping$lzycompute$1(Assembly.scala:45)
[error] 	at sbtassembly.Assembly$.stratMapping$1(Assembly.scala:45)
[error] 	at sbtassembly.Assembly$.inputs$lzycompute$1(Assembly.scala:128)
[error] 	at sbtassembly.Assembly$.inputs$1(Assembly.scala:118)
[error] 	at sbtassembly.Assembly$.apply(Assembly.scala:145)
[error] 	at sbtassembly.Assembly$.$anonfun$assemblyTask$1(Assembly.scala:320)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:835)
[error] (common / assembly) deduplicate: different file contents found in the following:
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.4.4/scala-collection-compat_2.12-2.4.4.jar:scala/annotation/nowarn$.class
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.13/scala-library-2.12.13.jar:scala/annotation/nowarn$.class
[error] deduplicate: different file contents found in the following:
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.4.4/scala-collection-compat_2.12-2.4.4.jar:scala/annotation/nowarn.class
[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.13/scala-library-2.12.13.jar:scala/annotation/nowarn.class

but i thought this was fixed in 2.4.0... or am i misinterpreting that commit?

@jakeonfire
Copy link
Author

working around it with

    case PathList("scala", "annotation", "nowarn.class") => MergeStrategy.last
    case PathList("scala", "annotation", "nowarn$.class") => MergeStrategy.last

but seems like this shouldn't be necessary

@jakeonfire jakeonfire changed the title duplicates scala/annotation/nowarn.class with different file contents duplicate scala/annotation/nowarn.class with different file contents Feb 9, 2022
@SethTisue
Copy link
Member

SethTisue commented Feb 12, 2022

This was fixed by #460. You are using an outdated version of scala-collection-compat; try 2.6.0.

Your Scala 2.12 version is also outdated; if I didn't know what the problem was, I would also have asked if the problem is reproducible on 2.12.15.

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

No branches or pull requests

2 participants