Closed luc-blaeser closed 2 months ago
Update: Probably not yet an issue. But this will become relevant with enhanced orthogonal persistence, cf. https://github.com/dfinity/motoko/pull/4602
dfx does not yet report warning from the Motoko stable compatibility check, only errors. As a consequence, in the future, users will not get a warning e.g. when a Motoko program upgrade drops a stable variable.
dfx
See also https://forum.dfinity.org/t/stable-variables-persistence/34039. I am not sure whether the user already tested EOP.
I tried the following with Motoko's enhanced orthogonal persistence:
First Motoko program version:
actor { stable var x = 1; }
dfx deploy
Second Motoko program version:
actor { }
I expected to see this happen: A warning message that stable variable x will be dropped and state potentially lost.
x
Such a message is returned by moc --stable-compatible on stderr.
moc --stable-compatible
stderr
Instead, this happened: Upgrade without warning. Accidental loss of data.
dfx --version: 0.22.0
dfx --version
It seems that this is not an issue but only some change relevant for EOP. Not sure how the https://forum.dfinity.org/t/stable-variables-persistence/34039 was produced in practice.
Update: Probably not yet an issue. But this will become relevant with enhanced orthogonal persistence, cf. https://github.com/dfinity/motoko/pull/4602
dfx
does not yet report warning from the Motoko stable compatibility check, only errors. As a consequence, in the future, users will not get a warning e.g. when a Motoko program upgrade drops a stable variable.See also https://forum.dfinity.org/t/stable-variables-persistence/34039. I am not sure whether the user already tested EOP.
I tried the following with Motoko's enhanced orthogonal persistence:
First Motoko program version:
dfx deploy
Second Motoko program version:
dfx deploy
I expected to see this happen: A warning message that stable variable
x
will be dropped and state potentially lost.Such a message is returned by
moc --stable-compatible
onstderr
.Instead, this happened: Upgrade without warning. Accidental loss of data.
Meta
dfx --version
: 0.22.0