diff --git a/src/mo_types/type.ml b/src/mo_types/type.ml index 3c0b25609ff..2e0a6abf331 100644 --- a/src/mo_types/type.ml +++ b/src/mo_types/type.ml @@ -1420,8 +1420,8 @@ let canister_settings_typ = let wasm_memory_persistence_typ = sum [ - ("Keep", unit); - ("Replace", unit); + ("keep", unit); + ("replace", unit); ] let upgrade_with_persistence_option_typ = diff --git a/src/prelude/internals.mo b/src/prelude/internals.mo index 713b7544ddb..b9fb873320b 100644 --- a/src/prelude/internals.mo +++ b/src/prelude/internals.mo @@ -401,8 +401,8 @@ module @ManagementCanister = { }; type @WasmMemoryPersistence = { - #Keep; - #Replace; + #keep; + #replace; }; type @UpgradeOptions = { @@ -460,7 +460,7 @@ func @install_actor_helper( }; case (#upgrade actor2) { let wasm_memory_persistence = if enhanced_orthogonal_persistence { - ?(#Keep) + ?(#keep) } else { null }; diff --git a/test/run-drun/actor-class-mgmt-enhanced.mo b/test/run-drun/actor-class-mgmt-enhanced.mo index 17a82939001..730ad569bf4 100644 --- a/test/run-drun/actor-class-mgmt-enhanced.mo +++ b/test/run-drun/actor-class-mgmt-enhanced.mo @@ -123,7 +123,7 @@ actor a { assert (c5 == c4); let c6 = await - (system Cs.C)(#upgrade_with_persistence { wasm_memory_persistence = #Keep ; canister = c5 })(6, null); + (system Cs.C)(#upgrade_with_persistence { wasm_memory_persistence = #keep ; canister = c5 })(6, null); assert ({args = 6; upgrades = 3} == (await c6.observe())); assert (c6 == c5); @@ -135,7 +135,7 @@ actor a { // no need to add cycles let c8 = await - (system Cs.C)(#upgrade_with_persistence { wasm_memory_persistence = #Replace ; canister = c7 })(8, null); + (system Cs.C)(#upgrade_with_persistence { wasm_memory_persistence = #replace ; canister = c7 })(8, null); assert ({args = 8; upgrades = 0} == (await c8.observe())); assert (c8 == c7); diff --git a/test/run-drun/map-mixed-upgrades/map0.mo b/test/run-drun/map-mixed-upgrades/map0.mo index 96ac9dea3a9..3a73ef81682 100644 --- a/test/run-drun/map-mixed-upgrades/map0.mo +++ b/test/run-drun/map-mixed-upgrades/map0.mo @@ -68,7 +68,7 @@ actor a { case null {}; case (?n) { nodes[i] := - ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #Keep; canister = n })(i)); // upgrade! + ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #keep; canister = n })(i)); // upgrade! } } } @@ -80,7 +80,7 @@ actor a { case null {}; case (?n) { nodes[i] := - ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #Replace; canister = n })(i)); // upgrade! + ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #replace; canister = n })(i)); // upgrade! } } } diff --git a/test/run-drun/map-mixed-upgrades/map1.mo b/test/run-drun/map-mixed-upgrades/map1.mo index f85e7439064..60c7f00fc37 100644 --- a/test/run-drun/map-mixed-upgrades/map1.mo +++ b/test/run-drun/map-mixed-upgrades/map1.mo @@ -79,7 +79,7 @@ actor a { case null {}; case (?n) { nodes[i] := - ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #Keep; canister = n })(i)); // upgrade! + ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #keep; canister = n })(i)); // upgrade! } } } @@ -91,7 +91,7 @@ actor a { case null {}; case (?n) { nodes[i] := - ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #Replace; canister = n })(i)); // upgrade! + ? (await (system Lib.Node)(#upgrade_with_persistence { wasm_memory_persistence = #replace; canister = n })(i)); // upgrade! } } } diff --git a/test/run-drun/migration-paths/new-installer.mo b/test/run-drun/migration-paths/new-installer.mo index de73aae5e23..777fda0ab5d 100644 --- a/test/run-drun/migration-paths/new-installer.mo +++ b/test/run-drun/migration-paths/new-installer.mo @@ -19,7 +19,7 @@ actor { switch testCanister { case null Prim.trap("null canister"); case (?canister) { - ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #Keep; canister })(); + ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #keep; canister })(); Prim.debugPrint("Upgraded (keep main memory)"); }; }; @@ -29,7 +29,7 @@ actor { switch testCanister { case null Prim.trap("null canister"); case (?canister) { - ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #Replace; canister })(); + ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #replace; canister })(); Prim.debugPrint("Upgraded (replace main memory)"); }; }; diff --git a/test/run-drun/migration-paths/old-installer.mo b/test/run-drun/migration-paths/old-installer.mo index 461e2f459e7..a5708fca3d7 100644 --- a/test/run-drun/migration-paths/old-installer.mo +++ b/test/run-drun/migration-paths/old-installer.mo @@ -31,7 +31,7 @@ actor installer { switch testCanister { case null Prim.trap("null canister"); case (?canister) { - ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #Keep; canister })(); + ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #keep; canister })(); Prim.debugPrint("Upgraded (keep main memory)"); } } @@ -41,7 +41,7 @@ actor installer { switch testCanister { case null Prim.trap("null canister"); case (?canister) { - ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #Replace; canister })(); + ignore await (system TestCanister.TestCanister)(#upgrade_with_persistence { wasm_memory_persistence = #replace; canister })(); Prim.debugPrint("Upgraded (replace main memory)"); } }