sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

Semantic version selector expressions

Open bpholt opened this issue 3 years ago • 4 comments

Now that sbt 1.7 has been released with support for semantic version selector expressions (like + 2.13.x), it would be nice if the generated YAML used the .x syntax and the specific versions were only specified in the sbt build definition. This would avoid having to update the YAML configs any time a Scala version update is merged.

bpholt avatar Jul 12 '22 16:07 bpholt

Thanks for opening the issue! Yes I'm quite looking forward to this.

We can get this into 0.4.x behind a opt-in setting, or into 0.5 by default. 0.5 is imminent-ish, the current external blocker is the next Laika release which is also imminent-ish.

armanbilge avatar Jul 12 '22 16:07 armanbilge

The other thing we need to be mindful of are projects that run CI against every Scala patch (e.g. compiler plugins).

armanbilge avatar Jul 12 '22 16:07 armanbilge

Yeah, seems like it would be wise to make it configurable. Maybe opt-in in 0.4 and then opt-out in 0.5?

bpholt avatar Jul 12 '22 16:07 bpholt

Well, it can also be smart. e.g. if your crossScalaVersions has got multiple versions for the same Scala binary version, then it has to fallback. Otherwise it can use the semantic selector.

armanbilge avatar Jul 12 '22 17:07 armanbilge

Until sbt-typelevel 0.5.x is available, a workaround is to set:

ThisBuild / githubWorkflowScalaVersions := Seq("2.13", "3")

armanbilge avatar Oct 21 '22 14:10 armanbilge