-
Notifications
You must be signed in to change notification settings - Fork 109
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
IDL: Implement width subtyping for sequences directly #755
Conversation
without appealing to records, and clarifying that it can be done lazily. This allows functions to add new result values and new (optional) argument values just fine. It seems.
Co-Authored-By: Claudio Russo <claudio@dfinity.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I am not sure this is correct. It seems to me that it runs afoul the same contra-variance violation that we have run into before, i.e., the subtyping against null/any is the wrong way around in the higher-order case.
It is still different from earlier attempts (e.g. indexing the judgment) because it is not “deep”. We do not mess with the subtyping/contravariance machinery in any deep or tricky way; we just have two different type constructors on the left and right of the arrow. Because of this, I am fairly confident that it is sound, and reasonably confident that it does not forbid any useful upgrade behavior. |
Co-Authored-By: Claudio Russo <claudio@dfinity.org>
Intriguing, but my head hurts. |
the decoder did not ignore extra arguments, as envisioned by the current verison of the IDL. (This would change again a bit if we’d go for #755..)
Correct What you lose is:
|
#757) * IDL Decoder: Ignore extra args (vanilla argument list width subtyping) the decoder did not ignore extra arguments, as envisioned by the current verison of the IDL. (This would change again a bit if we’d go for #755..) * Fix bug in reference serialization I had an off-by-factor-of-4 bug, which lead to extra references being transmitted. This also uncovered a mild bug with `dvm`, so this depends on https://github.com/dfinity-lab/dev/pull/1117 * Fix dev import * Back to `dev` master * More normalization * Update test output
Probably obsoleted by #832 (As the |
In terms of size, no changes are observed in 2 tests. |
without appealing to records, and clarifying that it can be done lazily.
This allows functions to add new result values and new (optional)
argument values just fine. It seems.