Skip to content
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

Make Candid JS library backward compatible #524

Open
chenyan-dfinity opened this issue Feb 3, 2022 · 1 comment
Open

Make Candid JS library backward compatible #524

chenyan-dfinity opened this issue Feb 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@chenyan-dfinity
Copy link
Contributor

https://dfinity.atlassian.net/browse/ICSUP-2629

The JS library is not conforming to the spec. Decoding message record { } as type record { a : opt int } results in an error with field a not found. This means that the Candid JS binding has to always use the latest did file if there is an upgrade on the server side.

@dfx-json dfx-json added the bug Something isn't working label Feb 4, 2022
@krpeacock
Copy link
Contributor

This would be fine if we interpreted the type as { a ?: number }. Any case where we interpret opt as an array will fail this standard.

This relates to dfinity/candid#300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants