Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vladimirkl
Copy link
Contributor

This PR fixes ConfigProvider#orElse which currently doesn't work with combination of nesting and indexed data:

val configProvider =
  ConfigProvider.fromMap(Map("employees[0].age" -> "1")).unnested("parent1") orElse
    ConfigProvider.fromMap(Map("employees[0].age" -> "2")).unnested("parent2")

val config = Config.listOf("employees", Config.int("age")).nested("parent1")

configProvider.load(config) // Fails with missing data error

Also added a bit more tests for orElse to avoid regressions

@adamgfraser adamgfraser merged commit 1181cf2 into zio:series/2.x May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants