zio-config
zio-config copied to clipboard
Easily use and document any config from anywhere in ZIO apps
Currently, wrapping a `ConfigSource` into a layer will **do the wrong thing**. e.g. `fromHocon(...).toLayer`. The problem is that the memoization happens in the "outer" `ZManaged` of the config source. But...
Rather than use Magnolia or custom macros, we can switch to ZIO Schema, which will soon feature derivation for Scala 2.x and Scala 3.x, which also supports annotations. Once we...
The main goal is to have automatic support for config descriptors that are value classes. ```scala import zio.config.magnolia.DeriveConfigDescriptor.Descriptor case class Port(value: Int) extends AnyVal implicit val portDescriptor: Descriptor[Port] = Descriptor[Int].transform(Port,...
Following ZIO's lead, we can implement composable zips in this project, allowing us to "zip" together config descriptors in a way that does not nest tuples, and which eliminates Unit...
A `mapAt` allows you to drill into a part of a `ConfigSource` and apply changes (such as `mapKeys`) to only that part. To implement this, I think we can benefit...
A `Union` expresses a property tree that could be one thing or another. It allows you to model a "universe" of possibilities (as in the `List` monad, which models non-determinism)....
We have a zio.config.typesafe package that can write back any config description to `Json`. We need the similar functionality for yaml, as currently zio-config can only read yaml, and cannot...
For instance, refer to the below snippet that talks about scala versions in the library. ```scala private val versions: Map[String, String] = { import org.snakeyaml.engine.v2.api.{Load, LoadSettings} import java.util.{List => JList,...
ZIO is at Milestone 4, with an RC expected in the next few weeks. https://github.com/zio/zio/releases/tag/v2.0.0-M4 The API is nearly stable at this point, so any early migration work against this...