github zio/zio-config v1.0.0-RC14

latest releases: v4.0.2, v4.0.1, v4.0.0...
4 years ago
  1. Better handling of coproducts (with zio-config-magnolia). Now handles case-objects

    Please refer to the following examples

    https://github.com/zio/zio-config/blob/master/examples/src/main/scala/zio/config/examples/typesafe/CoproductSealedTraitExample.scala

    https://github.com/zio/zio-config/blob/master/examples/src/main/scala/zio/config/examples/magnolia/CoproductSealedTraitExample.scala

    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.

  2. 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

  3. 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

  4. ConfigSource is independent of ZIO

    ConfigSource acted as an interface, such that, when given a path (key) it returned a value in IO or ZIO.
    This is now returning a PropertyTree.

    Some sources in ConfigSource are now independent of ZIO (Ex: Map) as well.

  5. 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.

  6. Consistent integration with ZIO

    1. 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.

    2. Consistency between TypesafeConfig.scala and TypesafeConfigSource.scala

      When it comes to typesafe module, this is TypesafeConfig.scala and TypesafeConfigSource.scala.
      TypesafeConfigSource has methods that returns us with a ConfigSource that are formed from hocon files
      or strings. TypesafeConfig.scala is making it work with ZIO.Layer.

  7. 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.

    https://github.com/zio/zio-config/blob/master/examples/src/main/scala/zio/config/examples/typesafe/NullAndOptionalConfig.scala

  8. Empty List in Hocon will be failures. However, we will revisit this decision

Don't miss a new zio-config release

NewReleases is sending notifications on new releases.