Changelog:
- Allow extended traits to implement setting methods from their parents:
trait Parent {
def myNumber: Int
}
trait Child extends Parent
Settler.settings[Child](/*...*/)
// Will correctly implement the `myNumber` method.
- Allow lazy/eager loading of settings based on declaration:
trait Settings {
val eagerlyLoaded: String
def lazyLoaded: String
}
-
Format code using scalafmt
-
Add a config provider that uses environment variables:
trait Aws {
@Key(name = "AWS_SECRET_ACCESS_KEY")
def key: String
def awsSecretAccessKey: String
}
val s = Settler.settings[Aws](ConfigProvider.fromEnv())
println(s.key == s.awsSecretAccessKey)