Skip to content

Incompatible TASTy version silently ignored when used in macros #21244

Open
@WojciechMazur

Description

@WojciechMazur

Compiler version

All Scala versions, tested using 3.6.0-RC1-bin-20240719-af933c4-NIGHTLY

Minimized code

// Published using 3.1.2-RC2
//> using dep "com.typesafe.play::play-json:2.10.0-RC6"

// Published using 3.3.1, uncomment and remove previous dependency to make it compile
// //> using dep "com.typesafe.play::play-json:2.10.0"

import play.api.libs.json.{Json, Format}
case class Foo(field: Int)

object JsonFormats:
  implicit val namespaceStatsFormat: Format[Foo] = Json.format[Foo]

Output

-- Error: /Users/wmazur/projects/sandbox/src/main/scala/test.scala:12:62 -------
12 |  implicit val namespaceStatsFormat: Format[Foo] = Json.format[Foo]
   |                                                   ^^^^^^^^^^^^^^^^
   |                                              Field not found: Foo.field

Expectation

The compiler should detect incompatible TASTy versions and print informative messages about it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions