fix: reconcile project bundling with assets sync step removal#585
Merged
Conversation
The merge of #530 (project bundling) did not account for #582, which removed the `assets` sync step type, leaving `main` unable to compile: `bundle.rs` and `manifest/mod.rs` still referenced the deleted `adapter::assets` module and `SyncStep::Assets` variant. Mirror #582's removal in the bundle path: - drop the stale `adapter::assets` re-export - remove the asset-step handling from bundle.rs (import, match arms, `prepare_asset_step`, `asset_dirs` field and its archive-write loop); `type: assets` no longer deserializes, so this was dead code - convert the four asset-based bundle tests to plugin sync steps, which the bundle code already handles. `bundle_and_deploy` now uses the local example sync plugin (proven end-to-end by `sync_plugin_registers_seed_data`) instead of the retired `@dfinity/asset-canister@v2.1.0` recipe - hoist `build_sync_plugin_example` into the shared test `common` module Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes the main branch build break caused by stale references to the removed assets sync step type (type: assets) that remained in the project-bundling path and its integration tests. It aligns bundling and tests with the post-#582 manifest surface, where type: assets is rejected and plugin-based sync is the supported mechanism.
Changes:
- Removed the stale
adapter::assetsre-export and stripped all asset-sync bundling logic fromicp project bundle. - Updated bundle integration tests to use plugin sync steps (including verifying bundled plugin execution) instead of the retired assets step.
- Hoisted
build_sync_plugin_exampleinto the shared integration-testcommonmodule for reuse across suites.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/icp/src/manifest/mod.rs | Drops the obsolete adapter::assets re-export to match the removed assets sync step. |
| crates/icp-cli/src/operations/bundle.rs | Removes unreachable asset-step bundling code paths; bundling now only packages plugin sync inputs. |
| crates/icp-cli/tests/bundle_tests.rs | Converts bundle tests from assets sync to plugin sync and updates archive/manifest assertions accordingly. |
| crates/icp-cli/tests/sync_tests.rs | Switches to the shared build_sync_plugin_example helper. |
| crates/icp-cli/tests/common/mod.rs | Adds shared build_sync_plugin_example helper to build the example canister + sync plugin once for tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address review feedback: the converted plugin-sync tests use the `dirs` list field, but two doc comments still said `dir` (singular). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI on
mainis red. The merge of #530 (project bundling) did not reconcile with #582 (feat(sync)!: removeassetssync step type), which had merged just before it. #530's branch predated #582, so it still referenced the deletedadapter::assetsmodule andSyncStep::Assetsvariant. The result is amainthat does not compile:This single compile error caused the checks, Test, and Validate Examples jobs to fail. The
bundle_testsintegration suite would additionally fail at runtime, since four of its tests drive the now-rejectedtype: assetsstep.Fix
Mirror #582's removal in the bundle path:
adapter::assetsre-export inmanifest/mod.rs.bundle.rs(theassets::DirFieldimport, theSyncStep::Assetsmatch arms,prepare_asset_step, theasset_dirsfield and its archive-write loop).type: assetsno longer deserializes, so this code was unreachable.bundle_and_deploynow uses the local example sync plugin (proven end-to-end bysync_plugin_registers_seed_data) instead of the retired@dfinity/asset-canister@v2.1.0recipe —v2.1.0emits the removed step, and the recipe's deploy+serve path isn't exercised in CI (validate-examples only runsproject show).build_sync_plugin_exampleinto the shared testcommonmodule sosync_testsandbundle_testsshare it.Verification (local)
cargo build --workspaceandcargo test --workspace --no-runwithRUSTFLAGS="-D warnings"✅cargo clippy --workspace --all-targets✅ /cargo fmt --all --check✅cargo test --workspace --lib --bins✅cargo test --test bundle_tests— all 10 pass, includingbundle_and_deployend-to-end (deploy from extracted bundle; bundled plugin runs and seeds the canister) ✅🤖 Generated with Claude Code