Open
Description
Brian - thank you for a wonderful config library. We are finding it of good use.
One snag we hit recently is that the library doesn't support recursive configurations:
(simplified example)
public interface KVConfig {
@Config("dataset_name")
public String datasetName();
@Config("dataset_path")
public String datasetPath();
}
public interface CommonConfigs {
@Config("pin_impression")
KVConfig getPinImpressionKVConfigs();
@Config("pin_repin")
KVConfig getPinRepinKVConfigs();
}
The above doesn't work because the type coercion does not recursively try to parse the KVConfig type (it tries to cast to it).
It might be that this is "user error" and that this is supported - a colleague of mine and I couldn't get it working if so and we had to use parameterized configs instead as a workaround (pull request to update the Readme is here -- #18)
Could you:
- Confirm if this is a supported or unsupported?
- If unsupported, is this "easy" to do? (eg. just reinstantiate (internally) a ConfigurationObjectBuilder and bind?) or are there other complexities?
- If easy to do, could you suggest next steps? (if this is a super easy one-liner, would you be open to implementing the request?)
Best,
Divye
Metadata
Metadata
Assignees
Labels
No labels
Activity