Skip to content

[1.5.x] Scala 2.12.17 + Scala 2.13.10 + scala-xml 2.1.0#548

Merged
mkurz merged 8 commits into
playframework:1.5.xfrom
mkurz:scala_upgrades1.5.x
Dec 23, 2022
Merged

[1.5.x] Scala 2.12.17 + Scala 2.13.10 + scala-xml 2.1.0#548
mkurz merged 8 commits into
playframework:1.5.xfrom
mkurz:scala_upgrades1.5.x

Conversation

@mkurz

@mkurz mkurz commented Sep 22, 2022

Copy link
Copy Markdown
Member

This is probably needed if we want to upgrade the current Play 2.8.x branch with Scala 2.12.17

@guizmaii

guizmaii commented Oct 14, 2022

Copy link
Copy Markdown

We need this change in Caliban. See ghostdogpr/caliban#1472

error] stack trace is suppressed; run last play / update for the full output
[error] (play / update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] 	* org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over 1.2.0
[error] 	    +- org.scala-lang:scala-compiler:2.12.17              (depends on 2.1.0)
[error] 	    +- com.typesafe.play:twirl-api_2.12:1.5.1             (depends on 1.2.0)
[error]
[error]
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel

Why is your PR a draft @mkurz?

@mkurz

mkurz commented Oct 14, 2022

Copy link
Copy Markdown
Member Author

Because as long as there is no sbt 1.8 this pull request alone doesn't help. If I would merge that and release with a Play 2.8.x minor version lots of apps will break currently... If we have sbt 1.8 we could at least tell people to upgrade sbt in our release notes.
I saw you just opened sbt/sbt#7050 (comment) let's see if it makes it into sbt 1.7.x but I doubt it.

@mkurz

mkurz commented Oct 14, 2022

Copy link
Copy Markdown
Member Author

@guizmaii You can work around the error meanwhile, see here. scala-xml 1 and 2 are compatible AFAIK, so that should not make a difference. I recommend to also put that in your build.sbt not just project/plugins.sbt.

@guizmaii

Copy link
Copy Markdown

@mkurz Thanks! 🙂

@ckipp01

ckipp01 commented Nov 11, 2022

Copy link
Copy Markdown

Just a heads up, now that sbt 1.8.0 is released. Is the plan to get this merged in and released?

@ennru

ennru commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

A dependencyUpdates on plugins with this PR currently says

[info]   com.dwijnand:sbt-dynver               : 4.0.0              -> 4.1.1
[info]   com.typesafe.play:interplay           : 2.1.6   -> 2.1.10             -> 3.0.7
[info]   com.typesafe:sbt-mima-plugin          : 0.6.4              -> 0.9.2   -> 1.1.1
[info]   de.heikoseeberger:sbt-header          : 5.3.0   -> 5.3.1   -> 5.9.0
[info]   org.scala-js:sbt-scalajs              : 1.11.0             -> 1.12.0
[info]   org.scala-lang:scala-library:provided : 2.12.12 -> 2.12.17 -> 2.13.10
[info]   org.scalameta:sbt-scalafmt            : 2.2.1              -> 2.5.0

@ennru

ennru commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

This PR started before Travis was replaced with GH workflows. Needs a rebase.

@mkurz

mkurz commented Dec 19, 2022

Copy link
Copy Markdown
Member Author

@ennru This pr is against the 1.5.x branch, on which we never set up Github actions (yet): https://github.com/playframework/twirl/tree/1.5.x/.github/workflows (Probably we thought we would not release new 1.5.x versions or postponed GHA until its necessary for that branch).
From the main branch we already cut some milestone releases: https://github.com/playframework/twirl/releases/tag/1.6.0-M7 - maybe that helps for you use case as well? On the main branch we already have support for Scala 3, but also dropped Java 8. Is that what you are looking for?

@ennru

ennru commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

Thanks, @mkurz. I thought I had seen milestones, but than there was this PR... I believe we're good.

@mkurz

mkurz commented Dec 19, 2022

Copy link
Copy Markdown
Member Author

@ennru I just tagged 1.6.0-RC1 which should be available on maven central soon.
I think we can move on to releasing 1.6.0 soon if no one comes up with more issues (afaik people already use and tested the milestone releases, so we should be safe)
Please also let me know if that RC works for you, thanks!

@mkurz

mkurz commented Dec 19, 2022

Copy link
Copy Markdown
Member Author

@ennru Ah and also be aware that the groupId changed from com.typesafe.sbt to com.typesafe.play

@mkurz mkurz force-pushed the scala_upgrades1.5.x branch from ca12482 to 974f8e6 Compare December 19, 2022 12:24
@mkurz

mkurz commented Dec 19, 2022

Copy link
Copy Markdown
Member Author

The 1.5.x branch is quite outdated and still supports sbt 0.13.x so I had to apply some workarounds so we are able to pull in scala-xml 2.1.x (which causes problems with scala-js...), but I am almost there... Will push and merge later

@mkurz

mkurz commented Dec 20, 2022

Copy link
Copy Markdown
Member Author

Pulling in scala-xml 2.x requires scala-js 1.x, but that isn't available for sbt 0.x anymore, so I had to find a workaround. I pushed all the changes that I think are necessary and good to go, published a snapshot and try to make use of it in playframework/playframework#11590, let's see
EDIT: Oh and we need to change the groupId to com.typesafe.play because we don't have access to the xxx.sbt one.

@mkurz mkurz changed the title [1.5.x] Scala 2.12.17 + Scala 2.13.9 + scala-xml 2.1.0 [1.5.x] Scala 2.12.17 + Scala 2.13.10 + scala-xml 2.1.0 Dec 20, 2022
@mkurz

mkurz commented Dec 23, 2022

Copy link
Copy Markdown
Member Author

So I can't really test this in playframework/playframework#11590 right now because we are stuck there for other reasons (see its comments).
Anyway, I tested this pull request locally by running all the tests + scripted tests with the scripts I updated in the scripts/ folder (ran them with Java 8 + Java 11). So I think we are pretty good to go.
The only real change, besides upgrading to scala-xml 2.x is that the twirl-api now depends on scala.js 0.6 for Scala 2.10 (like before) but the Scala 2.12 and 2.13 artifacts now depend on scala.js 1.12.0... I hope this will not break anything, but IMHO this is the only way... The tests at least pass.

So the dependency tree looked like this before:

...
[info] com.typesafe.play:twirl-api_sjs0.6_2.10:1.5.x [S]
[info]   +-org.scala-js:scalajs-library_2.10:0.6.33 [S]
...

Now it looks like this

[info] com.typesafe.play:twirl-api_sjs1_2.12:1.5.x [S]
[info]   +-org.scala-js:scalajs-library_2.12:1.12.0 [S]
[info]   | +-org.scala-js:scalajs-javalib:1.12.0
[info]   | 
[info]   +-org.scala-lang.modules:scala-xml_sjs1_2.12:2.1.0 [S]
[info]     +-org.scala-js:scalajs-library_2.12:1.12.0 [S]
[info]     | +-org.scala-js:scalajs-javalib:1.12.0
[info]     | 
[info]     +-org.scala-js:scalajs-library_2.12:1.9.0 (evicted by: 1.12.0)

Given I tested this thoroughly I will merge and release 1.5.2 since it was requested by some users 😉
Function wise nothing changed from 1.5.1, so you can still stay on 1.5.1.

@mkurz mkurz marked this pull request as ready for review December 23, 2022 16:18
@mkurz

mkurz commented Dec 23, 2022

Copy link
Copy Markdown
Member Author

Oh and btw: I don't wanted to spend to much time with the 1.5.x branch anymore, so I didn't even bother to setup GitHub actions anymore, that's why I ran tests + will do the releases on my machine. In case we have to cut more 1.5.x releases I will take time to set up the GHA...

@mkurz mkurz merged commit 583a3c5 into playframework:1.5.x Dec 23, 2022
@mkurz mkurz deleted the scala_upgrades1.5.x branch December 23, 2022 16:19
@mkurz

mkurz commented Dec 27, 2022

Copy link
Copy Markdown
Member Author

twirl 1.5.2, with dependency to scala-xml 2.x is now released: https://github.com/playframework/twirl/releases/tag/1.5.2
Be aware the groupId changed, scala-steward is aware of that already and should visit your repo soon: https://github.com/scala-steward-org/scala-steward/blob/0b4779236bc17ad0465fe958af219093881bcab8/modules/core/src/main/resources/artifact-migrations.v2.conf#L128-L132

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 this pull request may close these issues.

4 participants