← Back to issue list

feat: support multi-base recipes

View original Github issue

Metadata

Project
charmcraft
Number
#2054
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged. Implemented multi-base recipe support using the platforms keyword, removing base and build-base fields. Refactored data handling to delegate to craft-platforms for consistent processing. Closes #1789 and #2008.

Suggested action:

No scores available.

Issue body

Adds support for multi-base recipes with the `platforms` keyword. Internally, this moves to a new practice where the application stops modifying project data before passing the it to craft-platforms. This will ensure consistent processing by charmcraft and by launchpad. Documentation is coming soon via https://github.com/canonical/craft-platforms/issues/75 and https://github.com/canonical/charmcraft/issues/2009. To summarize the usage, `base` and `build-base` are removed from the project and the base is encoded into the platform. Platforms can be defined in a shorthand notation: ```yaml platforms: ubuntu@22.04:amd64: ubuntu@24.04:amd64: ``` Or they can be defined in standard form: ```yaml platforms: jammy: build-on: [ubuntu@22.04:amd64] build-for: [ubuntu@22.04:amd64] noble: build-on: [ubuntu@24.04:amd64] build-for: [ubuntu@24.04:amd64] ``` Fixes #1789 Fixes #2008 Creates https://github.com/canonical/craft-platforms/issues/85 Found during implementation https://github.com/canonical/craft-platforms/issues/80 (CRAFT-3718)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Implemented multi-base recipe support using the platforms keyword, removing base and build-base fields. Refactored data handling to delegate to craft-platforms for consistent processing. Closes #1789 and #2008.
qwen3.6-35b-a3b-mtp-q6 Merged. Implements multi-base recipe support using a new platforms keyword, replacing base and build-base fields by encoding bases into platform definitions. Routes processing to craft-platforms for consistency. Closes #1789 and #2008.
qwen3.6-35b-a3b-mtp-q6 Merged. Adds multi-base recipe support via a platforms keyword, replacing base and build-base fields. The change stops modifying project data before passing it to craft-platforms for consistent processing. Fixes #1789 and #2008.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#598 feat: allow for multi-base builds craft-application merged Merged to enable multi-base builds by allowing bases in the platforms entry. Approved by three reviewers, passed CI, and resolves issue #569. Modified four files with 46 additions and 28 deletions.
76%