Skip to content

IDL Hashing does not follow upgrade spec #559

@krpeacock

Description

@krpeacock

Describe the bug
By adding a new field to an error variant, I get back an error Cannot find field hash _2102411630_ when using a version of the generated delcarations without the new variant.

To Reproduce

  1. Deploy canister with type
  public type CreateInvoiceErr = {
    message : ?Text;
    kind : {
      #BadSize;
      #InvalidToken;
      #InvalidAmount;
      #InvalidDestination;
      #InvalidDetails;
      #MaxInvoicesReached;
      #Other;
    };
  };
  1. Generate declarations
  2. Add type #NotAuthorized;
  3. Redeploy, and make call using prior declarations

Expected behavior
Agent JS should make the call without the most up to date interface

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions