GithubHelp home page GithubHelp logo

Scala 3 stable release about play-json HOT 16 CLOSED

fgrutsch avatar fgrutsch commented on May 27, 2024
Scala 3 stable release

from play-json.

Comments (16)

mkurz avatar mkurz commented on May 27, 2024 5

I did publish RC9 yesterday evening build with Scala 3.3.0. This is the last RC before final.

from play-json.

hagay3 avatar hagay3 commented on May 27, 2024 2

@mkurz
Testing RC7 with Scala 3 also passes compilation and tests.
https://github.com/hagay3/skuber/actions/runs/3271735985/jobs/5381881898

from play-json.

mkurz avatar mkurz commented on May 27, 2024 1

2.10.0-RC7 released: https://github.com/playframework/play-json/releases/tag/2.10.0-RC7
Please test this version, I will promote it to final release if everything is ok.

from play-json.

hagay3 avatar hagay3 commented on May 27, 2024 1

@mkurz
Sorry for the late response.
I don't know what caused the compile issue above, maybe a local sbt issue.
After testing again I'm not able to see those errors anymore.
Also I was able to release skuber with Scala 3 support.

from play-json.

plokhotnyuk avatar plokhotnyuk commented on May 27, 2024 1

What's the status of the next release. Anything we could do to help?

Derivation using Json.format doesn't work for Scala 3 in the jsoniter-scala-benchmark project.
To reproduce just need to move PlayJsonDerivedFormats object from scala-2 to scala sub-directory and try to compile with sbt jsoniter-scala-benchmarkJVM/compile.

Here is the compiler output with an error message
[error] -- Error: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/benchmark/PlayJsonDerivedFormats.scala:10:38 
[error] 10 |    implicit lazy val v1: Format[X] = Json.format
[error]    |                                      ^^^^^^^^^^^
[error]    |Exception occurred while executing macro expansion.
[error]    |scala.quoted.runtime.impl.ScopeException: Expression created in a splice was used outside of that splice.
[error]    |Created in: play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:431 at column 16
[error]    |Used in: play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:368 at column 42
[error]    |Expr: obj
[error]    |
[error]    |
[error]    |Creation stack:
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:431 at column 16
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:105 at column 58
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:784 at column 21
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacros.scala:78 at column 38
[error]    |
[error]    |
[error]    |Use stack:
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:368 at column 42
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:105 at column 58
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala:784 at column 21
[error]    |	play-json/shared/src/main/scala-3/play/api/libs/json/JsMacros.scala:78 at column 38
[error]    |
[error]    |
[error]    |Hint: A common reason for this to happen is when a `def` that creates a `'{...}`
[error]    |      captures an outer instance of `Quotes`. If this `def` is called in a splice
[error]    |      it will not track the `Quotes` provided by that particular splice.
[error]    |      To fix it add a `given Quotes` to this `def`.
[error]    |          
[error]    |	at scala.quoted.runtime.impl.ScopeException$.checkInCorrectScope(ScopeException.scala:35)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.quotedExprToTree(PickledQuotes.scala:39)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:111)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1446)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1412)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.spliceTerms(PickledQuotes.scala:151)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.unpickleTerm(PickledQuotes.scala:87)
[error]    |	at scala.quoted.runtime.impl.QuotesImpl.unpickleExprV2(QuotesImpl.scala:3044)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.$anonfun$13(JsMacroImpl.scala:368)
[error]    |	at scala.collection.immutable.List.map(List.scala:246)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.readFields$1(JsMacroImpl.scala:373)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.productReads$$anonfun$1(JsMacroImpl.scala:431)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.productReads$$anonfun$adapted$1(JsMacroImpl.scala:431)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:109)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1446)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1434)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformSub(Trees.scala:1511)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1432)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1478)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformStats(Trees.scala:1503)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1412)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.spliceTerms(PickledQuotes.scala:151)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.unpickleTerm(PickledQuotes.scala:87)
[error]    |	at scala.quoted.runtime.impl.QuotesImpl.unpickleExprV2(QuotesImpl.scala:3044)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.productReads(JsMacroImpl.scala:431)
[error]    |	at play.api.libs.json.JsMacroImpl$ReadsHelper.productReads$(JsMacroImpl.scala:198)
[error]    |	at play.api.libs.json.JsMacroImpl$$anon$1.productReads(JsMacroImpl.scala:127)
[error]    |	at play.api.libs.json.JsMacroImpl$.readsExpr(JsMacroImpl.scala:168)
[error]    |	at play.api.libs.json.JsMacroImpl$.$anonfun$1(JsMacroImpl.scala:105)
[error]    |	at play.api.libs.json.JsMacroImpl$.$anonfun$adapted$1(JsMacroImpl.scala:105)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:109)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1446)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1478)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformStats(Trees.scala:1503)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1412)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.spliceTerms(PickledQuotes.scala:151)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.unpickleTerm(PickledQuotes.scala:87)
[error]    |	at scala.quoted.runtime.impl.QuotesImpl.unpickleExprV2(QuotesImpl.scala:3044)
[error]    |	at play.api.libs.json.JsMacroImpl$.configuredReads(JsMacroImpl.scala:105)
[error]    |	at play.api.libs.json.JsMacroImpl$.formatImpl$$anonfun$1(JsMacroImpl.scala:784)
[error]    |	at play.api.libs.json.JsMacroImpl$.formatImpl$$anonfun$adapted$1(JsMacroImpl.scala:785)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:109)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1446)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1475)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1507)
[error]    |	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1507)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformStats(Trees.scala:1503)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformBlock(Trees.scala:1505)
[error]    |	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1426)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:134)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.spliceTerms(PickledQuotes.scala:151)
[error]    |	at dotty.tools.dotc.quoted.PickledQuotes$.unpickleTerm(PickledQuotes.scala:87)
[error]    |	at scala.quoted.runtime.impl.QuotesImpl.unpickleExprV2(QuotesImpl.scala:3044)
[error]    |	at play.api.libs.json.JsMacroImpl$.formatImpl(JsMacroImpl.scala:785)
[error]    |	at play.api.libs.json.JsMacroImpl$.format$$anonfun$1(JsMacroImpl.scala:63)
[error]    |	at play.api.libs.json.JsMacroImpl$.withSummonedConfig(JsMacroImpl.scala:79)
[error]    |	at play.api.libs.json.JsMacroImpl$.format(JsMacroImpl.scala:63)
[error]    |
[error]    |----------------------------------------------------------------------------
[error]    |Inline stack trace
[error]    |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]    |This location contains code that was inlined from JsMacros.scala:78
[error]     ----------------------------------------------------------------------------
[error] one error found

from play-json.

mkurz avatar mkurz commented on May 27, 2024 1

@xuwei-k 👍 release coming soon, I think it's time for prime time.

from play-json.

mkurz avatar mkurz commented on May 27, 2024

Servus, my time is limited the next 3 weeks (see https://github.com/orgs/playframework/discussions/11313), however if you want to dig in and want to provide pull requests you are more than welcome to do so. I think we have RC's with Scala 3 artifacts already however. Play itself however still needs some love to finally ship Scala 3 artifacts.

from play-json.

mkurz avatar mkurz commented on May 27, 2024

@fgrutsch There is Play JSON 2.10.0-RC6 already which does have support for Scala 3, does that work for you for now?

from play-json.

fgrutsch avatar fgrutsch commented on May 27, 2024

@mkurz Yes, the RC works fine for us right now. It is just a little bit annoying right now to work with the RC, because as I mentioned third-party libraries that we are using can't be published as Scala 3 right now (e.g. as mentioned tapir-play-json which can't be upgraded until play-json is available for Scala 3), it is no stress though :)

I saw that the two open Sacla 3 PRs got merged now so nothing really we could have contributed in the past few weeks (it was more about offering help/support in general)

Play itself however still needs some love to finally ship Scala 3 artifacts.

Does it matter at all, or in general to be dependent on Play itself as play-json is more or less anyways standalone and has its own versioning? Or you just wanna do it at the same time then? Just curious about that

PS: I am off for the next 3 weeks

from play-json.

hagay3 avatar hagay3 commented on May 27, 2024

Hi @mkurz @fgrutsch
Im trying to upgrade my library to play-json with support for scala 3, even when I'm using play-json version 2.10.0-RC6

I keep getting scala 3 macro error:

[error] -- Error: /Users/hagai.ovadia/Hagai/mydev/skuber/client/src/main/scala/skuber/Scale.scala:42:55 
[error] 42 |    implicit val scaleSpecFormat: Format[Scale.Spec] = Json.format[Scale.Spec]
[error]    |                                                       ^
[error]    |Scala 2 macro cannot be used in Dotty. See https://dotty.epfl.ch/docs/reference/dropped-features/macros.html
[error]    |To turn this error into a warning, pass -Xignore-scala2-macros to the compiler

Any idea?
here is my build.sbt
https://github.com/hagay3/skuber/blob/fcac5026e2a200882ff15a5e99e3fca930cf692e/build.sbt

from play-json.

vejeta avatar vejeta commented on May 27, 2024

What's the status of the next release. Anything we could do to help?

from play-json.

dejvid avatar dejvid commented on May 27, 2024

When is this happening? Our company is blocked too? :(

from play-json.

mkurz avatar mkurz commented on May 27, 2024

2.10.0-RC8 is now published, with Scala Native support. Please test, if nothing comes up this will promoted as final release in May.

from play-json.

xuwei-k avatar xuwei-k commented on May 27, 2024

Can't use play-json 2.10.0-RC8 with Scala 3.3.0 final. please release new version 🙏

[error] error while loading package,
[error] class file play/api/libs/json/package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
[error] TASTy signature has wrong version.
[error]  expected: {majorVersion: 28, minorVersion: 3}
[error]  found   : {majorVersion: 28, minorVersion: 3 [unstable release: 1]}
[error] 
[error] This TASTy file was produced by an unstable release.
[error] To read this TASTy file, your tooling must be at the same version.
[error] The TASTy file was produced by Scala 3.3.0-RC5.

from play-json.

godenji avatar godenji commented on May 27, 2024

Hitting same error as @xuwei-k here.

Any ETA on a 2.10,0 release?

from play-json.

mkurz avatar mkurz commented on May 27, 2024

2.10.0 released:
https://github.com/playframework/play-json/releases/tag/2.10.0

from play-json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.