Skip to content

Commit 448ebf1

Browse files
authored
chore: bump recommended asset canister recipe version to 2.2.1 (#210)
1 parent fcb4e30 commit 448ebf1

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

evaluations/asset-canister.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"name": "Asset canister recipe setup",
2828
"prompt": "Show me the icp.yaml configuration for a frontend asset canister with a Vite build step. Just the YAML and the deploy command, no .ic-assets.json5 or programmatic upload code.",
2929
"expected_behaviors": [
30-
"Shows icp.yaml with @dfinity/asset-canister recipe pinned to v2.2.0 or later",
30+
"Shows icp.yaml with @dfinity/asset-canister recipe pinned to v2.2.1 or later",
3131
"Includes build commands (npm install, npm run build)",
3232
"Specifies the output directory (e.g., dir: dist)",
3333
"Uses icp deploy commands, NOT dfx deploy"
@@ -38,7 +38,7 @@
3838
"prompt": "My icp.yaml has a sync step using `type: assets` with `dirs: [dist]` to upload my frontend, but icp-cli now refuses to load it, complaining the assets sync step type is no longer supported. Show me the corrected sync configuration — just the YAML.",
3939
"expected_behaviors": [
4040
"Explains that the built-in type: assets sync step is no longer supported / has been removed",
41-
"Recommends the @dfinity/asset-canister@v2.2.0 recipe, which generates a plugin-based sync step automatically",
41+
"Recommends the @dfinity/asset-canister@v2.2.1 recipe, which generates a plugin-based sync step automatically",
4242
"If writing a manual sync step, uses type: plugin (with a sync_plugin.wasm url + sha256) or type: script",
4343
"Does NOT reintroduce type: assets in the corrected YAML"
4444
]

icp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
canisters:
22
- name: frontend
33
recipe:
4-
type: "@dfinity/asset-canister@v2.2.0"
4+
type: "@dfinity/asset-canister@v2.2.1"
55
configuration:
66
version: asset-canister-404-support
77
dir: dist

skills/asset-canister/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ Access patterns:
4949

5050
9. **Downgrading the asset canister WASM version.** Upgrading a canister to an older WASM version can fail with "Cannot parse header" panics if the stable memory format changed between versions. Prefer the `@dfinity/asset-canister` recipe over `type: pre-built` with a manually specified WASM URL — the recipe loads the latest asset canister version automatically if not explicitly specified in `configuration.version`. If you must pin a version, ensure it matches or exceeds the version currently deployed on-chain. If a downgrade is intentional, use reinstall mode (`icp deploy --mode reinstall`) instead of upgrade — this wipes stable memory and all uploaded assets.
5151

52-
10. **Using the removed `type: assets` sync step.** icp-cli **0.3.0 removes the built-in `type: assets` sync step** — asset uploading is no longer part of the CLI core. A manifest that still uses it fails to load: *"icp-cli no longer supports the `assets` sync step type. Switch to a `script` or `plugin` sync step."* The fix is to use the `@dfinity/asset-canister@v2.2.0` recipe (shown below), which generates a `plugin`-based sync step automatically. **Recipe versions ≤ `v2.1.0` generate the old `type: assets` step and break on 0.3.0** — pin `v2.2.0` or later. Sync plugins are supported since icp-cli `0.2.7`, so adopting `v2.2.0` now (well before 0.3.0) makes the transition seamless. If you write a sync step by hand instead of using the recipe, use `type: plugin` (pointing at the certified-assets `sync_plugin.wasm` release artifact with its `sha256`) or `type: script`:
52+
10. **Using the removed `type: assets` sync step.** icp-cli **0.3.0 removes the built-in `type: assets` sync step** — asset uploading is no longer part of the CLI core. A manifest that still uses it fails to load: *"icp-cli no longer supports the `assets` sync step type. Switch to a `script` or `plugin` sync step."* The fix is to use the `@dfinity/asset-canister@v2.2.1` recipe (shown below), which generates a `plugin`-based sync step automatically. **Recipe versions ≤ `v2.1.0` generate the old `type: assets` step and break on 0.3.0** — pin `v2.2.1` or later. Sync plugins are supported since icp-cli `0.2.7`, so adopting `v2.2.1` now (well before 0.3.0) makes the transition seamless. If you write a sync step by hand instead of using the recipe, use `type: plugin` (pointing at the certified-assets `sync_plugin.wasm` release artifact with its `sha256`) or `type: script`:
5353

5454
```yaml
5555
sync:
5656
steps:
5757
- type: plugin
58-
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
58+
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
5959
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
6060
dirs:
6161
- dist
@@ -69,7 +69,7 @@ Access patterns:
6969
canisters:
7070
- name: frontend
7171
recipe:
72-
type: "@dfinity/asset-canister@v2.2.0"
72+
type: "@dfinity/asset-canister@v2.2.1"
7373
configuration:
7474
dir: dist
7575
build:

skills/icp-cli/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
9999
canisters:
100100
- name: frontend
101101
recipe:
102-
type: "@dfinity/asset-canister@v2.2.0"
102+
type: "@dfinity/asset-canister@v2.2.1"
103103
configuration:
104104
dir: dist
105105
build:
@@ -217,7 +217,7 @@ Source Code → [Build] → WASM → [Deploy] → Running Canister → [Sync]
217217
`icp deploy` runs all three phases in sequence:
218218
1. **Build** — Compile canisters to WASM (via recipes or explicit build steps)
219219
2. **Deploy** — Create canisters (if new), apply settings, install WASM
220-
3. **Sync** — Post-deployment operations via `script` or `plugin` steps (e.g., uploading assets). Asset uploading is not built into the CLI: the `@dfinity/asset-canister@v2.2.0` recipe supplies a `plugin` sync step that uploads the `dir` contents. The legacy built-in `type: assets` step is removed in icp-cli 0.3.0 — see the `asset-canister` skill.
220+
3. **Sync** — Post-deployment operations via `script` or `plugin` steps (e.g., uploading assets). Asset uploading is not built into the CLI: the `@dfinity/asset-canister@v2.2.1` recipe supplies a `plugin` sync step that uploads the `dir` contents. The legacy built-in `type: assets` step is removed in icp-cli 0.3.0 — see the `asset-canister` skill.
221221

222222
Run phases separately for more control:
223223
```bash
@@ -323,7 +323,7 @@ canisters:
323323
canisters:
324324
- name: frontend
325325
recipe:
326-
type: "@dfinity/asset-canister@v2.2.0"
326+
type: "@dfinity/asset-canister@v2.2.1"
327327
configuration:
328328
dir: dist
329329
build:
@@ -359,7 +359,7 @@ canisters:
359359
|--------|------------|-----------------|-----------------|
360360
| Rust | `@dfinity/rust@v3.2.0` | `package` | `candid`, `locked`, `shrink`, `compress` |
361361
| Motoko | `@dfinity/motoko@v4.1.0` | `main` | `candid`, `args`, `shrink`, `compress` |
362-
| Asset | `@dfinity/asset-canister@v2.2.0` | `dir` | `build`, `version` |
362+
| Asset | `@dfinity/asset-canister@v2.2.1` | `dir` | `build`, `version` |
363363
| Prebuilt | `@dfinity/prebuilt@v1.0.0` | `wasm` | `sha256`, `candid`, `shrink`, `compress` |
364364

365365
Verify latest recipe versions at [dfinity/icp-cli-recipes releases](https://github.com/dfinity/icp-cli-recipes/releases). Use `icp project show` to see the effective configuration after recipe expansion.

skills/icp-cli/references/dfx-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Steps:
9393
|----------|----------|
9494
| `"type": "rust"` | `recipe.type: "@dfinity/rust@v3.2.0"` |
9595
| `"type": "motoko"` | `recipe.type: "@dfinity/motoko@v4.1.0"` |
96-
| `"type": "assets"` | `recipe.type: "@dfinity/asset-canister@v2.2.0"` |
96+
| `"type": "assets"` | `recipe.type: "@dfinity/asset-canister@v2.2.1"` |
9797
| `"package": "X"` | `recipe.configuration.package: X` |
9898
| `"candid": "X"` | `recipe.configuration.candid: X` |
9999
| `"main": "X"` | `recipe.configuration.main: X` |

0 commit comments

Comments
 (0)