-
Notifications
You must be signed in to change notification settings - Fork 28
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
[YAML] Path resolution failing if a key is numeric #45
Comments
@dkambersky Thank you for your report! I have fixed it in a new release v0.22.0. Please have a try. |
Thanks for the quick response. It seems like it fails for values over an int's max value - e.g.
|
@dkambersky Yes, it only support int now. You can use tree:
"484444731619803154":
myVal: true Is it necessary to support such a large number in your use case? If not, I will delay |
It is really important to me - some of the keys I use are related to
Discord IDs of various elements (ie guilds, users) , which are Longs.
If it would take long to implement I'm not going to keep you from working
on the main update though.
Thanks!
…On Mon, 23 Dec 2019, 06:12 uchuhimo, ***@***.***> wrote:
Reopened #45 <#45>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45?email_source=notifications&email_token=AAIAJ2XTMCHQEWA723KQSVTQ2BCDPA5CNFSM4J6JA6ZKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVUKJUEQ#event-2903808530>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIAJ2WD5O53SVIZ6WX5AVLQ2BCDPANCNFSM4J6JA6ZA>
.
|
@dkambersky I release a new version v0.22.1 that fixes the problem. Please have a try. |
Same error unfortunately :( But I'll just use the string workaround for now, thanks again for being this fast to respond! |
@dkambersky I have added your example code as tests and all the tests are passed (see https://github.com/uchuhimo/konf/blob/master/konf-yaml/src/test/kotlin/com/uchuhimo/konf/source/yaml/YamlSourceLoadSpec.kt#L44-L73). Thus I believe the error has been gone. Would you like to provide your code that still has the same error? |
I'm sorry, that was my own oversight. It's working fine now. Thanks for the fix! |
I apologise if this is intended and documented somewhere, I couldn't find it mentioned anywhere.
Consider this yaml config file:
This will fail to resolve properly (i.e.
config.at("tree.1.myVal").toValue<Boolean>())
).However, if that
1
is renamed toa1
, everything works properly.The text was updated successfully, but these errors were encountered: