v0.5.0-RC1 #553
armanbilge
announced in
Announcements
v0.5.0-RC1
#553
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the first release candidate of sbt-typelevel v0.5.0. It brings several enhancements, unfortunately some of which may break existing builds. However for many projects with standard builds I expect upgrading to be simple and straightforward.
My goal is to update several Typelevel projects to the RC before designating a final release. If you have bandwidth to give it a try in your project, please do! I would be surprised if there aren't a few kinks to work out :)
Thank you to everyone who has contributed to this and previous releases!
Major changes
sbt v1.9.0
sbt-typelevel now requires sbt v1.9.0+.
CI jobs identified by Scala binary version
Previously, CI jobs were identified by the full Scala version e.g.
2.13.11
or3.2.2
. Now, they are identified only by the binary version e.g.2.13
or3
. This means that CI job names are now stable to Scala updates.However, if you have customized your CI matrix with exclusions or conditions based on the Scala version you will need to update those to match only on the binary version. To restore the old behavior set
githubWorkflowScalaVersions := scalaCrossVersions.value
.++
by @armanbilge in Use semantic version selector for++
#400Other enhancements
releaseNotesURL
setting by @armanbilge in PopulatereleaseNotesURL
setting #532Refreshed
scalac
optionsCompiler options are now optimized for the following Scala versions. If possible, please upgrade to these versions first.
Scala 2 is now tuned to behave like Scala 3, not the other way around
Previously, our compiler flags were tuned to make Scala 3 behave more like Scala 2 e.g. with
-source:3.0-migration
. Now, we have removed that flag and are instead tuning Scala 2 to behave more like Scala 3 e.g. with-Xsource:3
.One example of a common pattern where this makes a difference is a
case class
with aprivate
constructor.Under the old settings, this would still generate a public
apply(bar, baz)
method. Under the new settings. theapply
method will also be private, and you must explicitly add a publicapply
method if desired. This is Scala 3 behavior. Most projects should catch this change either at compile-time or with MiMa.-source:3.0-migration
by @armanbilge in Refresh scalac settings #531-Xsource:3
to 2.12 (and future minor 2 releases) builds by @etspaceman in Add -Xsource:3 to 2.12 (and future minor 2 releases) builds #493Unused warnings for all Scala versions
Additionally, unused warnings are now enabled on Scala 2.12 and Scala 3.3+, in addition to Scala 2.13.
Scala version-specific
@nowarn
sTo help manage fatal warnings when cross-building for multiple Scala versions, @satorg has created the scalac-compat library which provides
@nowarn2
,@nowarn3
, etc. This is now included by default as compile-only dependency.scalac-compat
dependency by default by @armanbilge in Addscalac-compat
dependency by default #518Other enhancements
tlFatalWarnings
now respectsCompile
/Test
scopes by @armanbilge in Refresh scalac settings #531Target JDK 8 by default
We now set
tlJdkRelease := Some(8)
so that the compiler explicitly targets JDK 8. If you are using APIs from newer JDKs your code will fail to compile. To target a newer JDK you may set e.g.tlJdkRelease := Some(11)
. To restore the old behavior, settlJdkRelease := None
i.e. no explicit target.tlJdkRelease := Some(8)
by @armanbilge in Set defaulttlJdkRelease := Some(8)
#218-release
->-java-output-version
in Scala 3.2 by @armanbilge in-release
->-java-output-version
in Scala 3.2 #543Publish to
s01.oss.sonatype.org
by defaultThe original
oss.sonatype.org
is now designated "legacy" in favor ofs01.oss.sonatype.org
. Typelevel and several other orgs are already publishing tos01
as well as all group IDs registered since 2021. You can migrate your org by opening a ticket on the Sonatype Jira. To restore the old behavior settlSonatypeUseLegacyHost := true
.s01.oss.sonatype.org
the default host by @armanbilge in Makes01.oss.sonatype.org
the default host #539Laika 0.19
Huge thanks to @jenshalm for releasing Laika v0.19.0 and upgrading the sbt-typelevel-site plugin. This includes several enhancements and overall improves the integration.
Projects not published under Typelevel will no longer automatically have Typelevel-themed websites. If you are a Typelevel-affiliated project you can opt-in to the theming by setting
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate)
.The
tlSiteRelatedProjects
setting is now deprecated. You may either remove it or replicate the feature as done in the following PR.tlSiteRelatedProjects
deprecation by @armanbilge in AddresstlSiteRelatedProjects
deprecation #549CI enhancements
JDKs and dependency caching
We now fully rely on the setup-java (and similar setup-graalvm) actions to manage JDKs and Maven dependency caching, instead of custom JDK index and caching steps.
Caching is now also more aggressive: if no cache is found, the CI job will create one by attempting to download all the dependencies used in the build (instead of only those specific to its position in the CI matrix). This greatly reduces the chance of cache misses in future CI jobs.
sbt update
on cache miss by @armanbilge in Runsbt update
on cache miss #423Dependency submission
Your project will now export its dependency graph to the GitHub API with the sbt-dependency-submission action. For example, this powers Dependabot vulnerability alerts. To opt-out, set
tlCiDependencyGraphJob := false
.More aggressive cancelation of CI jobs
The build CI jobs now have a default 60-minute timeout that is configurable e.g.
githubWorkflowBuildTimeoutMinutes := Some(30)
. CI is also now configured by default so that there is at most one concurrent job per PR or branch i.e. pushing another commit to a PR will cancel CI on the previous commit and merging another PR to main will cancel CI on the previous merge. Note that these concurrency limits will never affect the publishing of a tag.timeout-minutes
for a job and a step by @iRevive in Allow configuringtimeout-minutes
for a job and a step #416concurrency
for a job by @iRevive in Allow configuringconcurrency
for a job #417Refreshed
prePR
The
prePR
command now only runs "self-fixing" tasks such as scalafmt and scalafix. Furthermore, it respects your CI configuration e.g. if you have disabled formatting checks then they will not be included inprePR
.prePR
command by @armanbilge in BetterprePR
command #542,tlPrePRBotHook
should respect ci config #552Configurable BSP
Cross-platform projects that are "pure" (i.e., 100% share sources for all platforms) now enable BSP only for the JVM platform by default. This should reduce the load on IDEs.
You may configure which platforms you want to enable BSP for any cross project (pure or otherwise) by setting e.g.
tlBspCrossProjectPlatforms := Set(JVMPlatform, JSPlatform)
. This setting does not affect non-cross projects, including JS- or Native-only projects.Enhanced support for Scala Native
It is now easier to cross-build for Scala Native out-of-the-box.
sbt-scala-native-crossproject
to core by @armanbilge in Addsbt-scala-native-crossproject
to core #517TypelevelScalaNativeGitHubPlugin
by @armanbilge in AddTypelevelScalaNativeGitHubPlugin
#545Other changes with compatibility concerns
Other changes
Documentation
Thanks to @mzuehlke for on-going work to update our documentation with the latest and greatest!
Updates
New Contributors
Full Changelog: v0.4.22...v0.5.0-RC1
This discussion was created from the release v0.5.0-RC1.
Beta Was this translation helpful? Give feedback.
All reactions