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

specs2-commons depends on parser-combinators 2.0.0 #980

Closed
melezov opened this issue Aug 31, 2021 · 4 comments
Closed

specs2-commons depends on parser-combinators 2.0.0 #980

melezov opened this issue Aug 31, 2021 · 4 comments

Comments

@melezov
Copy link
Contributor

melezov commented Aug 31, 2021

Ever since 4.12.2, specs2-commons is depending on scala-parser-combinators 2.x:
https://mvnrepository.com/artifact/org.specs2/specs2-common_2.13/4.12.2

+-org.specs2:specs2-common_2.13:4.12.3 [S]
  +-org.portable-scala:portable-scala-reflect_2.13:1.1.1 [S]
  +-org.scala-lang.modules:scala-parser-combinators_2.13:2.0.0 [S]
  +-org.scala-lang:scala-reflect:2.13.6 [S]
  +-org.scala-sbt:test-interface:1.0
  +-org.specs2:specs2-fp_2.13:4.12.3 [S]

I'm raising this in light of the recent scala-xml revert to 1.3.x line in 4.12.5 as it might be something to reconsider.
Also, the code mentions that combinators 2.x are a requirement for scala-matcher-extra (https://github.com/etorreborre/specs2/blob/master/project/depends.scala#L18), but as you can see above it's being used within commons, so everywhere

scala-parser-combinators 2.x seems to be binary incompatible with 1.x as posted here:
https://github.com/scala/scala-parser-combinators/releases/tag/v2.0.0

This causes issues when adding specs2 to e.g. Play projects.
Perhaps explicitly overriding the version to either 2.x or 1.x would work in this type of setup. Will test on our CI.

[error] java.lang.RuntimeException: found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error]         * org.scala-lang.modules:scala-parser-combinators_2.13:2.0.0 (early-semver) is selected over {1.1.2, 1.1.2, 1.1.2}
[error]             +- org.specs2:specs2-common_2.13:4.12.3               (depends on 2.0.0)
[error]             +- org.playframework.anorm:anorm_2.13:2.6.10          (depends on 1.1.2)
[error]             +- com.typesafe.play:play_2.13:2.8.8                  (depends on 1.1.2)
[error]             +- com.typesafe:ssl-config-core_2.13:0.4.2            (depends on 1.1.2)

I don't have a suggestion on how to proceed, raising for awareness.

@etorreborre
Copy link
Owner

Thanks for reporting this. I'm thinking that we should apply the same treatment as for scala-xml: leave scala-parser-combinators-1.x for specs2-4.x and scala-parser-combinators-1.x for specs2-5.x. Especially since in specs2-5.x, there's no need anymore for using scala-parser-combinators in specs2-common or specs2-core (it is now only used in specs2-matcher-extra)

@melezov
Copy link
Contributor Author

melezov commented Aug 31, 2021

It makes a lot of sense, since then a minor (patch) release such as 4.12.1 -> 4.12.x would not cause disruptions.
When people perform major upgrades such as 4.x -> 5.x they will pay a lot more attention to resolve dependencies correctly.

@etorreborre
Copy link
Owner

fixed now with 4.12.6

@mkurz
Copy link
Collaborator

mkurz commented Aug 31, 2021

Yeah, scala-parser-combinators is the same story like scala-xml, we should stay on 1.x for specs 4.12.x

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

3 participants