Skip to content

Minimal sbt project to reproduce scala 3.7.1 error "package scala contains object and package with same name: caps" (scala 3 issue 22890)

Notifications You must be signed in to change notification settings

ThomasGrt/scala-3.7.1-reproduce-cap-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Context

Minimal setup to reproduce scala 3 issue described in scala/scala3#22890

  • problem appeared when switching from scala 3.6.4 to scala 3.7.0 (and 3.7.1) on one of our project
  • managed to reproduce it in a minimal setup, having only anorm dependency
  • Error message on sbt compile:
[warn] package scala contains object and package with same name: caps.
[warn] This indicates that there are several versions of the Scala standard library on the classpath.
[warn] The build should be reconfigured so that only one version of the standard library is on the classpath.
[warn] one warning found
  • Switch scala version to 3.6.4 and error goes away.
  • Don't know if it can help but here is the dependency tree:
sbt:minimal-sbt-app> dependencyTree
[info] default:minimal-sbt-app_3:1.0
[info]   +-org.playframework.anorm:anorm_3:2.8.1
[info]   | +-joda-time:joda-time:2.13.0
[info]   | +-org.joda:joda-convert:2.2.4
[info]   | +-org.playframework.anorm:anorm-tokenizer_3:2.8.1
[info]   | | +-org.scala-lang:scala3-library_3:3.3.4 (evicted by: 3.7.1)
[info]   | | +-org.scala-lang:scala3-library_3:3.7.1 [S]
[info]   | | 
[info]   | +-org.scala-lang.modules:scala-parser-combinators_3:2.3.0
[info]   | | +-org.scala-lang:scala3-library_3:3.2.2 (evicted by: 3.7.1)
[info]   | | +-org.scala-lang:scala3-library_3:3.7.1 [S]
[info]   | | 
[info]   | +-org.scala-lang:scala3-library_3:3.3.4 (evicted by: 3.7.1)
[info]   | +-org.scala-lang:scala3-library_3:3.7.1 [S]
[info]   | 
[info]   +-org.scala-lang:scala3-library_3:3.7.1 [S]
[info]   

Seems like only scala3-library_3:3.7.1 is kept other versions are evicted.

About

Minimal sbt project to reproduce scala 3.7.1 error "package scala contains object and package with same name: caps" (scala 3 issue 22890)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages