I’m using dfx 0.9.2
to deploy a canister to the local network twice without modifying it and get the following error:
Stable interface compatibility check failed for canister 'dao'.
Upgrade will either FAIL or LOSE some stable variable data.
/Users/moritz/projects/ic/flower-power-dao/fpd/.dfx/local/canisters/dao/dao.old.most:2.39-2.40: syntax error [M0001], unexpected token '/', expected one of token or <phrase> sequence:
}
<typ_args>?
; seplist(<typ_field>,<semicolon>)
or <typ>
. <id>
-> <typ_nobin>
and <typ>
Do you want to proceed? yes/No
I already deleted the .dfx
folder and ran dfx start --clean
, but this didn’t change anything.
The .most
files are identical, I guess this error is due to some sort of bug?
// dao.old.most
type Branch<K, V> = {left : Trie<K, V>; right : Trie<K, V>; size : Nat};
type Leaf<K, V> = {keyvals : AssocList/1<Key<K>, V>; size : Nat};
type List<T> = ?(T, List<T>);
type Proposal =
{
description : Text;
expiryDate : Int;
flowersVoted : List<Nat32>;
id : Nat;
options : [Option];
proposer : Principal;
state : ProposalState;
timestamp : Int;
title : Text;
totalVotes : Nat
};
actor {
stable var nextProposalId : Nat;
stable var proposals :
{#branch : Branch<Nat, Proposal>; #empty; #leaf : Leaf<Nat, Proposal>};
stable var votingHistories :
{
#branch : Branch<Principal, List<Nat>>;
#empty;
#leaf : Leaf<Principal, List<Nat>>
}
};
// dao.most
type Branch<K, V> = {left : Trie<K, V>; right : Trie<K, V>; size : Nat};
type Leaf<K, V> = {keyvals : AssocList/1<Key<K>, V>; size : Nat};
type List<T> = ?(T, List<T>);
type Proposal =
{
description : Text;
expiryDate : Int;
flowersVoted : List<Nat32>;
id : Nat;
options : [Option];
proposer : Principal;
state : ProposalState;
timestamp : Int;
title : Text;
totalVotes : Nat
};
actor {
stable var nextProposalId : Nat;
stable var proposals :
{#branch : Branch<Nat, Proposal>; #empty; #leaf : Leaf<Nat, Proposal>};
stable var votingHistories :
{
#branch : Branch<Principal, List<Nat>>;
#empty;
#leaf : Leaf<Principal, List<Nat>>
}
};