Open vigoo opened 3 years ago
Thanks @vigoo for moving the discussion here. Yes constants could be part of ConfigDescriptor. Agreed :)
We will continue working over this feature right after our 1.0 release. And I can see 1.0.1 would have semantics related to “constant” in “ConfigDescriptorModule”.
Hi @vigoo
I think, as a next step, Description
needs to hold the information about type
, constants
, default
separately. As of now its a comma separated string in a List.
This actually goes in line with this ticket. What do you think?
This came up in a discussion of https://github.com/vigoo/zio-aws/issues/144 and I wanted to move this topic here.
I believe the
DerivationUtils.constant
andDerivationUtils.constantString
would be useful outside the derivation implementation too, so it could be moved toConfigDescriptors
where the other config descriptor constructors are.More generally I think the derivation should be just an optional convenience tool and everything it does should be possible to do by the users by hand. Here this is somewhat true because the above mentioned descriptor can be implemented in user code but its not that straightforward as it needs a custom property type.