You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re “first be able to send messages to existing services (that came into existence with init args)”:
This is related to the discusion at #1549, and I think the conclusion (or at least one possible stance) was that by the time the .did file reaches the above code, it describes an installed service, not a canister class , and therefore there should not be any init parameters in that file.
The other stance is that that this is too pedantic and the parameters could just be ignored.
first be able to send messages to existing services (that came into existence with init args)
second, instantiating such services.
So the intended use case is the first one? Then I would say the workaround (removing the init arguments from did file) is the expected fix, because the running/instantiated canister is always a service, not a service constructor. I didn't see the Motoko code in the PR, are we using import "ic:/canister:" to import the service?
For the second case, I created #2132 as a first step. We also need a new URI for actor class, e.g. import "class:proposals.did", and this needs to be a local did file, as the did file from the canister is not an actor class.
rossberg
added
idl
Candid or serialisation
P1
high priority, resolve before the next milestone
labels
Dec 1, 2020
Currently there is an assertion failure in
when compiling .did files with services that take init arguments.
One such example is
https://github.com/dfinity-lab/dfinity/pull/6864/files#diff-47dc8fc25392fec08b3f4d2b12e98c0f6284b751ce0ceed8c450a7055bf23e11R40
For now we have a workaround to exclude those args from the
.did
: https://github.com/dfinity-lab/dfinity/pull/6864/commits/69a813a913299668368e4b35cc3d6073de648795Please note, that this issue can be split, to
Clearly, the first part is sufficient to deal with the problem described above, and as such has priority.
The text was updated successfully, but these errors were encountered: