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

Candid subtype check during deserialization #2582

Closed
nomeata opened this issue Jun 11, 2021 · 4 comments
Closed

Candid subtype check during deserialization #2582

nomeata opened this issue Jun 11, 2021 · 4 comments
Labels
idl Candid or serialisation P1 high priority, resolve before the next milestone

Comments

@nomeata
Copy link
Collaborator

nomeata commented Jun 11, 2021

Looks like don’t have an issue for this yet…

In dfinity/candid#168 the Candid rules were changed to require a dynamic eager subtyping check during serialization. And we should implement this.

I believe that we should first build the infrastructure for type representations (#2348), and then re-implement the deserialization on top of that. The current implementation scheme is not well suited for this subtyping check.

@nomeata nomeata added the idl Candid or serialisation label Jun 11, 2021
@rossberg rossberg added the P1 high priority, resolve before the next milestone label Jun 29, 2021
@nomeata
Copy link
Collaborator Author

nomeata commented Jan 14, 2022

With dfinity/candid#311 this will look different again. Subtype checks are now boolean (instead of producing a coercion function), do can be done in rust if preferred, and no Motoko type rep is needed.

@ggreif
Copy link
Contributor

ggreif commented Jan 25, 2023

@crusso is this resolved now?

@crusso
Copy link
Contributor

crusso commented Jan 25, 2023

Yep

@crusso
Copy link
Contributor

crusso commented Jan 25, 2023

Fixed by #3171

@crusso crusso closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idl Candid or serialisation P1 high priority, resolve before the next milestone
Projects
None yet
Development

No branches or pull requests

4 participants