feat: Project bundling#530
Draft
adamspofford-dfinity wants to merge 4 commits intomainfrom
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an icp project bundle command to produce a deployable .tar.gz by building canisters, rewriting the manifest to use pre-built WASM steps, and packaging WASMs plus asset sync directories. This also updates manifest serialization and JSON schemas so the rewritten manifest is emitted cleanly, and adds integration tests validating bundling + deploy behavior.
Changes:
- Add
icp project bundleCLI subcommand and bundling operation that builds canisters and emits a rewrittenicp.yaml+ artifacts into a.tar.gz. - Add/adjust
Serializeimplementations across manifest types to support emitting a rewritten manifest (and update JSON schemas/defaults accordingly). - Add end-to-end tests and CLI docs for the new command.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/schemas/icp-yaml-schema.json | Adjust defaults (e.g., settings {}, lists []) to match new serialization output and bundling use cases. |
| docs/schemas/environment-yaml-schema.json | Remove default: null for reserved cycles field. |
| docs/schemas/canister-yaml-schema.json | Adjust settings default to {} and remove default: null for reserved cycles field. |
| docs/reference/cli.md | Document icp project bundle and update project command description. |
| crates/icp/src/manifest/recipe.rs | Implement string serialization for RecipeType; ensure recipe structs remain serializable. |
| crates/icp/src/manifest/project.rs | Derive Serialize for ProjectManifest (needed to emit rewritten manifests). |
| crates/icp/src/manifest/network.rs | Derive Serialize and omit None fields in serialized output. |
| crates/icp/src/manifest/mod.rs | Export additional manifest types and implement Serialize for Item<T>. |
| crates/icp/src/manifest/environment.rs | Implement custom Serialize for EnvironmentManifest to omit default/implicit fields. |
| crates/icp/src/manifest/canister.rs | Derive Serialize and omit None init args / sync fields in serialized output. |
| crates/icp/src/canister/mod.rs | Skip serializing None settings fields to avoid emitting nulls. |
| crates/icp-cli/tests/bundle_tests.rs | Add integration tests for bundling + deploy, and for rejecting script sync steps. |
| crates/icp-cli/src/operations/mod.rs | Register new bundle operation module. |
| crates/icp-cli/src/operations/bundle.rs | Implement tar.gz bundle creation, manifest rewriting, and asset directory packaging. |
| crates/icp-cli/src/main.rs | Wire icp project bundle into command dispatch. |
| crates/icp-cli/src/commands/project/mod.rs | Add bundle subcommand under project. |
| crates/icp-cli/src/commands/project/bundle.rs | Implement CLI args and invoke bundling operation. |
| crates/icp-cli/Cargo.toml | Add tar dependency for bundle creation. |
| Cargo.lock | Record new dependency usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.