Skip to content

Using Scala 3 seriously breaks default value handing #362

@strelec

Description

@strelec

Minimal example:

case class A(a: Int = 1)

import upickle.default._
implicit val rw: ReadWriter[A] = macroRW[A]

println(read[A]("{\"a\":2}"))
println(read[A]("{}"))

Expected (upickle 1.4.0, Scala 2.13.6):

A(2)
A(1)

Got (upickle 1.4.0, Scala 3.0.1):

A(2)
A(2)

God knows how many projects are silently corrupting their databases. Or leaking data from another user in their API calls. Since the parser is keeping and leaking state, everything is possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions