← 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

PR #2054 by mr-cal merged (commit 1ad02d82), adding multi-base recipe support via the `platforms` keyword, dropping base/build-base from project data and passing it unmodified to craft-platforms (CRAFT-3718).

Resolution: closed resolved

Reason: The pull request was merged into main as commit 1ad02d82 ('feat: support multi-base platform recipes (#2054)'), implementing the `platforms` shorthand and standard build-on/build-for forms and fixing issues #1789 and #2008.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved PR #2054 by mr-cal merged (commit 1ad02d82), adding multi-base recipe support via the `platforms` keyword, dropping base/build-base from project data and passing it unmodified to craft-platforms (CRAFT-3718).
stealth/space-bunny-alpha — closed resolved Multi-base recipe support was merged in canonical/charmcraft#2054 (commit 1ad02d82), adding platforms-based builds and removing base/build-base from project data.
stealth/space-bunny-alpha — closed resolved Merged PR #2054 (commit 1ad02d82) added multi-base recipes via platforms, removed base/build-base fields, and fixed #1789 and #2008.
stealth/space-bunny-alpha — closed resolved PR #2054 merged as 1ad02d82, adding multi-base platforms support and replacing top-level base/build-base fields; fixes #1789 and #2008.
stealth/space-bunny-alpha — closed resolved Merged in canonical/charmcraft#2054 (commit 1ad02d82), adding multi-base recipe support through platforms and removing base/build-base project fields.
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1789 (confidence 95%)

    Multi-base subordinate charm builds on 24.04 enabled by platforms-based recipes; issue closed by this PR.

  • Likely Fixed By: canonical/charmcraft#2008 (confidence 93%)

    Multi-base platform support feature request satisfied by the merged implementation.

  • Related To: canonical/charmcraft#2009 (confidence 70%)

    Documentation follow-up issue; later closed as superseded by internal ticket CRAFT-3720 rather than by this PR.

  • Related To: canonical/craft-platforms#85 (confidence 45%)

    Upstream craft-platforms issue created during this implementation.

  • Related To: canonical/craft-platforms#80 (confidence 40%)

    Upstream craft-platforms issue found during implementation of the platforms handling.

  • Related To: canonical/charmcraft#2069 (confidence 30%)

    Follow-up dependency update of craft-application/craft-providers building on the new platforms workflow.

Related issues

Issue Project State Summary Similarity
#598 feat: allow for multi-base builds craft-application merged Merged as d81c39a7; allowed bases in platform entries so applications can implement multi-base build plans, fixing #569 (CRAFT-3719).
82%
#2008 Multi-base platform support charmcraft closed Multi-base support shipped in charmcraft#2054 (commit 1ad02d82) via platforms-based recipes; the prototype was not separately polished, but the requested capability was implemented.
80%
#81 feat: multi-base support for charm build plans craft-platforms merged Merged PR #81 as commit 519b705, adding multi-base charm build-plan support and fixing #73, with stricter shorthand validation and CraftPlatformsError.
76%
#52 feat: add support for the "platforms" primitive rockcraft merged Merged PR canonical/rockcraft#52 (commit 9f4269c4) added the 'platforms' primitive to rockcraft.yaml, implementing multi-architecture build syntax requested in issue #49, which is now closed.
72%
#214 feat: support 26.10 as a stable base and build-base debcraft merged Merged PR #214 adding Ubuntu 26.10 as a stable base and build-base, replacing the `devel` wildcard fallback, and updating craft-providers to 3.8.0.
71%
#483 feat: support "--platform" for "clean" craft-application merged Merged PR #483 via commit 07e89deb, adding --platform to clean so one managed instance can be removed, and fixing craft-application#425.
70%