Releases: zio/zio-config
v4.0.3
Highlights
This release brings a new feature for Scala 3 that allows users deriving Config
instances using the Scala 3 derives
keyword.
The syntax is enabled by adding the import zio.config.magnolia.*
import in the file where the case class / sealed trait is defined:
import zio.Config
import zio.config.magnolia.*
case class Foo(key1: String, key2: Int) derives Config
What's Changed
- Update sbt-buildinfo to 0.12.0 by @scala-steward in #1378
- Removed silencer SBT plugin by @tPl0ch in #1171
- Update aws-java-sdk-ssm to 1.12.721 by @scala-steward in #1408
- Update scala3-library to 3.4.1 by @scala-steward in #1405
- Update sbt-scalafix to 0.12.1 by @scala-steward in #1402
- Update scalafmt-core to 3.7.17 by @scala-steward in #1325
- Remove Duplicated Title from README by @khajavi in #1415
- fix: ZIO Config Guide Invalid link by @varshith257 in #1434
- Update SBT for pureconfig. by @yangzai in #1464
- Update dependencies, build and CI by @kyri-petrou in #1478
- Update enumeratum to 1.7.5 by @scala-steward in #1465
- Update scalaz-core to 7.4.0-M15 by @scala-steward in #1462
- Update cats-core to 2.12.0 by @scala-steward in #1422
- Make it possible to use
derives Config
syntax in Scala 3 by @kyri-petrou in #1479 - Update zio, zio-streams, zio-test, ... to 2.1.12 by @scala-steward in #1482
- Update sbt-bloop to 2.0.5 by @scala-steward in #1481
- Update sbt-buildinfo to 0.13.1 by @scala-steward in #1483
- Update zio-aws-ssm to 7.28.29.4 by @scala-steward in #1484
- add DeriveConfig instances for NonEmptyChunk by @mberndt123 in #1455
- Update refined to 0.11.2 by @scala-steward in #1424
- Reduce amount of generated code when deriving
Config
s in Scala 3 by @kyri-petrou in #1480 - Fix compiling after merge error for Scala 3 by @kyri-petrou in #1509
- Update refined to 0.11.3 by @scala-steward in #1508
- Update sbt, sbt-dependency-tree, ... to 1.10.7 by @scala-steward in #1507
- Update zio-aws-ssm to 7.28.29.11 by @scala-steward in #1506
- Update sbt-ci-release to 1.9.2 by @scala-steward in #1503
- Update sbt-bloop to 2.0.6 by @scala-steward in #1499
- Update mdoc, sbt-mdoc to 2.6.2 by @scala-steward in #1498
- Update zio, zio-streams, zio-test, ... to 2.1.14 by @scala-steward in #1504
- Update zio-sbt-website to 0.4.0-alpha.29 by @scala-steward in #1510
- Update aws-java-sdk-ssm to 1.12.780 by @scala-steward in #1500
- Update pureconfig-core to 0.17.8 by @scala-steward in #1488
- Update auxlib, clib, javalib, nativelib, ... to 0.5.6 by @scala-steward in #1486
- Update scalafmt-core to 3.8.3 by @scala-steward in #1445
New Contributors
- @tPl0ch made their first contribution in #1171
- @varshith257 made their first contribution in #1434
- @kyri-petrou made their first contribution in #1478
Full Changelog: v4.0.2...v4.0.3
v4.0.2
What's Changed
- Update aws-java-sdk-ssm to 1.12.709 by @scala-steward in #1401
- Add annotations for key modifications by @IvanFinochenko in #1399
- Add safe ZIO methods builders of ConfigProvider by @IvanFinochenko in #1398
- Update typesafe:config to 1.4.3 by @scala-steward in #1304
- Update refined to 0.11.1 by @scala-steward in #1352
- Update scala-collection-compat to 2.12.0 by @scala-steward in #1395
- Update sbt-bloop to 1.5.17 by @scala-steward in #1387
- Update sbt-scalajs, scalajs-compiler, ... to 1.16.0 by @scala-steward in #1379
- Update scala3-library to 3.3.3 by @scala-steward in #1368
New Contributors
- @IvanFinochenko made their first contribution in #1399
Full Changelog: v4.0.1...v4.0.2
v4.0.1
v4.0.0
v4.0.0-RC16
Changes
Minor bug fixes
v4.0.0-RC15
Remove debug in scala3
v4.0.0-RC14
Updates
- Add type-discriminator support for scala-3 auto derivation. Note that this support already existed in scala-2 auto derivation
import zio.config._, magnolia._, typesafe._
@nameWithLabel("type")
sealed trait FooBar
case class Foo(name: String) extends FooBar
case class Bar() extends FooBar
case class MyConfig(a: FooBar, b: FooBar)
val hocon =
s"""
{
a : {
type : Foo
name : baz
},
# Bar is just name since it has no fields, and therefore no need of type descriminator
b : Bar
}
"""
ConfigProvder.fromHoconString(hocon).load(deriveConfig[MyConfig])
Find more examples here:
v4.0.0-RC13
Update
With this release, zio-config stopped considering comma separated values as list, and made it configurable.
Implementation detail
zio-config depends on ZIO's Flat even to handle indexed format with the recent changes and ZIO's Flat always consider list as comma separated. This resulted in reintroducing certain issues where values with comma were considered as list in HOCON, YML etc.
This behaviour is now made configurable within zio-config, with default behaviour as not having any such assumptions.
v4.0.0-RC12
Updates
- Fix issue in reading boolean values from HOCON
- Simplify defining custom DeriveConfig instance, by adding
mapAttempt
intoDeriveConfig
in both scala2 and scala3
Example:
implicit val zonedDateTimeParse: DeriveConfig[ZonedDateTime] = DeriveConfig[String].mapAttempt(ZonedDateTime.parse)
// instead of
implicit val zonedDateTimeParse: DeriveConfig[ZonedDateTime] = DeriveConfig(deriveConfig[String].mapAttempt(ZonedDateTime.parse))
- Update documentations
v4.0.0-RC11
Updates
- Support period
(.)
character in keys of YML and JSON/HOCON. - Ensure that zio-config works with the
orElse
combinator of ZIO'sConfigProvider
. This allows zio-config's complex configurations to be part of theorElse
combinator of ConfigProvider. This also fixes issues such as #1095 along with making sure that we can inject HOCON/YML config providers inZIO.Runtime
- Ensure that we support an empty list in YML and XML.
- Ensure that we keep the order of values in list configurations.
Most of these changes rely on using the latest indexing support in core ZIO's ConfigProvider (2.0.10). See zio/zio#7823 and zio/zio#7891. Therefore this release uses ZIO 2.0.10