-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sealed class detection is buggy when parameters are overriden #210
Comments
So delving in deeper, when you override a value, you're not overriding the whole object, but overriding that specific value, which means there's ambiguity over which to pick. So in your original example: config.toml
default-config.toml
Merged result
So now which subtype to pick ? |
I guess for TOML only, we could introduce a flag that allows you to specify that an inline table completely overrides? |
Maybe it could be an annotation on the sealed class that "flags" it for overriding the table completely? That way it would be backwards compatiable and the old behavior can still be achieved when wanted. |
That would be nice from a user point of view. The problem is hoplite generates the entire tree of values before then applying it to the config classes. That idea might work if the node's where lazy which perhaps we could do in the 2.0 update that I'm planning. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Will always pick the first one.
The text was updated successfully, but these errors were encountered: