Releases: zio/zio-config
Releases · zio/zio-config
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
v4.0.0-RC10
- Previously, zio-config mistakenly treated comma-separated values as lists because it used the ConfigProvider.Flat.util.parsePrimitive method internally. This is now fixed, and now we no longer need to use
seqDelim
to indicate that values should be treated as lists. For example, a list value is always within[]
for HOCON/JSON. - This fix resolves potential issues like the one described in #1085.
- XML support has been moved to the experimental stage until it can handle all complex types.