-
Notifications
You must be signed in to change notification settings - Fork 34
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
Play 2.9 & Scala 3 #321
Play 2.9 & Scala 3 #321
Conversation
RELEASE-NOTES.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included the changes to RELEASE-NOTES.md
, version.sbt
, and README.md
to release 2.9, but feel free to drop these changes if you want to make them yourself!
d97acb7
to
2827377
Compare
e351f57
to
d45833a
Compare
project/build.properties
Outdated
@@ -1 +1 @@ | |||
sbt.version = 1.3.12 | |||
sbt.version = 1.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scala 3 requires atleast SBT 1.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Play 2.9 requires at least sbt 1.9.6, not sure how this affect libraries such as this one though but upgrading to sbt 1.9.7 should be straightforward, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch! Seems to compile fine and tests run, so lets bump it.
@@ -45,16 +45,16 @@ class AuthenticationTest extends AnyFunSuite with Matchers with ScalaCheckProper | |||
} | |||
|
|||
a[UnsupportedOperationException] shouldBe thrownBy( | |||
await(ws.url("/").withAuth("user", "s3cr3t", WSAuthScheme.NTLM).get) | |||
await(ws.url("/").withAuth("user", "s3cr3t", WSAuthScheme.NTLM).get()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functions must be called using parenthesis in Scala now
@@ -20,6 +20,9 @@ import scala.concurrent.Future | |||
import scala.concurrent.duration._ | |||
import org.scalatest.funsuite.AnyFunSuite | |||
import org.scalatest.matchers.should.Matchers | |||
import play.api.libs.ws.writeableOf_String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are implicit BodyParser implementations for reading and writting Strings to request bodies. They now need to be imported explicitly in Scala 3 (I think? Scala 3 compilation wouldn't work unless I did).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same "issue" in my projects, not sure if that's really intended though.
….13 anymore so its not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, LGTM.
@@ -22,21 +22,21 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest] | |||
scala: [2.12.10, 2.13.1] | |||
java: [temurin@8] | |||
scala: [2.13.1, 3.3.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2.13.1? The latest 2.13.x release is 2.13.12
Is this a typo, like everywhere in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.13.1 was the previously set version of Scala that this project was using, I avoided bumping anything more than I needed to get this project to work with Play 2.9 and Scala 3
What this changes
Play 2.9 was just released, this PR bumps
play-mockws
to the newest version. Play 3.x has also just been released but will involve some breaking changes, figure some people might have some benefit to having a Play 2.9 version of this library before then.How this was tested
Tests ran against Scala 2.13 and Scala 3 with:
sbt ++3.3.1! test
sbt ++2.13.1! test