-
Better handling of coproducts (with zio-config-magnolia). Now handles case-objects
Please refer to the following examples
The hocon structures required to satisfy coproduct (sealed-trait & case class/case objects) don't require any
additional labels or tags for the library to understand. It stays readable and intuitive. This is not true in many
other existing implementations. -
Bug fixes in typesafe config
Complex trees were not handled in previous releases. We made the internal data structures expressive now. We
will be polishing them soon.https://github.com/zio/zio config/blob/master/examples/src/main/scala/zio/config/examples/typesafe/NonEmptyListExample.scala
-
Config[A] is now, a type alias to
Has[A]
There is no separate
Config.Service
.https://github.com/zio/zio-config/blob/master/core/src/main/scala/zio/config/package.scala#L5
-
ConfigSource is independent of ZIO
ConfigSource acted as an interface, such that, when given a path (key) it returned a value in
IO
orZIO
.
This is now returning a PropertyTree.Some sources in ConfigSource are now independent of ZIO (Ex: Map) as well.
-
Being able to return scala.Either
If you need a only simple scala.Either as your return types, its is possible with zio-config now. Refer to examples.
-
Consistent integration with ZIO
-
Consistency between Config.scala and ConfigSource.scala
Config.scala exists when we need a fully ZIO-compatible version regardless of ConfigSource being pure or not.
-
Consistency between TypesafeConfig.scala and TypesafeConfigSource.scala
When it comes to typesafe module, this is
TypesafeConfig.scala
andTypesafeConfigSource.scala
.
TypesafeConfigSource
has methods that returns us with aConfigSource
that are formed from hocon files
or strings.TypesafeConfig.scala
is making it work with ZIO.Layer.
-
-
zio-config can now handle orElseEither and orElse in Hocon strucutures
This will be an original feature in zio-config, and stands out from the rest of other libraries. -
Empty List in Hocon will be failures. However, we will revisit this decision