cucumber/cucumber-jvm-scala

Compile with latest Scala 3 version

gaeljw opened this issue · 1 comments

🤔 What's the problem you're trying to solve?

As Scala 3.1.2 brings forward compatibility feature, it would be nice to compile the project with latest Scala 3 version (3.1.2 as of now) and target an output version of 3.0.2 so that users not yet on 3.1.x can still use the lib.

✨ What's your proposed solution?

N/A

⛏ Have you considered any alternatives or workarounds?

N/A

📚 Any additional context?

This requires sbt 1.7+ (currently 1.7.0-M2 supports it, so we could start the work in a branch and wait for stable 1.7 or even consider releasing with 1.7.0-M2 if no issue raised during tests).

Scala 3.2 drops support for Scala output version, let's forget this!

See more context at https://www.scala-lang.org/blog/2022/08/17/long-term-compatibility-plans.html

This was the solution that we invested the most into. It was discussed in detail in the previous blog post. To summarize: in 3.1.2, we have shipped a new experimental compiler flag that allowed developers to make the compiler generate output that is usable by older versions of the compiler. While this would allow all projects to receive important fixes, it would probably result in a strange state where all the libraries are released with output version 3.1, similar to how nearly all java libraries are still released with output version 8, even though Java 8 is eight years old.

More importantly, during work on 3.2, we realized that maintaining this flag may be more challenging than anticipated. With time, it will be increasingly harder to be sure that our handling of it is correct. Thus, we have decided to remove the possibility of configuring the output version altogether in Scala 3.2.