Skip to content

chimney-macro-commons after Scala.3.8/JDK 26 #801

@MateuszKubuszok

Description

@MateuszKubuszok

Recap:

  1. JDK 26 removes sun.misc.Unsafe
  2. which is used on Scala 3 to implement lazy vals
  3. so lazy vals stops working
  4. so newer Scala versions changes how lazy vals are generated moving to JDK 17 as minimal supported
  5. Chimney delegates a huge part of its logic to chimney-macro-commons - virtually every change to macro commons bumps major version and is followed by updating the dependency on both 1.+ and 2.+ branch
  6. which means that even if Chimney 2.0.0 moves to new LTS and JDK17+, it will still fail to run on JDK26+

There are 2 choices:

  1. when releasing 2.0.0, to immediately stop supporting 1.+ - which still supports e.g. 2.12, and 3.3 and there is nothing about the code that justifies the drop
  2. use sbt-projectmatrix to compile 2 versions of each macro-commons artifact - one for JDK8 (2.12, 2.13, 3.3) and one for JDK17+ (2.13?, 3.9+), then use the appropriate version - PITA for setting up, but would allow to keep on improving Chimney 1.+ indefinitely

For me the question is almost academical as I am wrapping up my work with this project, but for someone who would intend to step in, this will be an important decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeChange resulting in compilation errors of code that used to be considered correct, or linking errorsenhancementhelp wanted

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions