← Back to issue list

build: don't create implicit part if parts section specified (CRAFT-633)

View original Github issue

Metadata

Project
charmcraft
Number
#596
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged. Resolves #590 by preventing implicit charm or bundle part creation when the parts section is explicitly defined. Adds tests for various parts configurations and passes CI.

Suggested action:

No scores available.

Issue body

The `charm` part is implicitly created in a charm project if no parts are specified by the user. If the toplevel `parts:` property is declared, the implicit part is not created. Do the same with the `bundle` part in bundle projects. Fixes #590 **Note to reviewers**: tests for the following cases have been added to the charm and bundle building tests: * No `parts` section defined * `parts` section defined and `charm` or `bundle` part declared with additional files in `prime`. * `parts` section defined without `charm` or `bundle` part declared. In the charm project case this can be used to create generic hooks-based charms. * `parts` section defined and `charm` or `bundle` part declared with a non `charm` or `bundle` plugin. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Resolves #590 by preventing implicit charm or bundle part creation when the parts section is explicitly defined. Adds tests for various parts configurations and passes CI.
qwen3.6-35b-a3b-mtp-q6 Merged. Prevents implicit charm or bundle parts from being created when a parts section is explicitly defined. Resolves #590 and CRAFT-633 by aligning behavior with user configuration. Includes comprehensive tests.
qwen3.6-35b-a3b-mtp-q6 Merged. Prevents implicit charm and bundle part creation when a parts section is explicitly defined. Resolves #590 and includes tests for multiple configuration scenarios.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#458 build: integrate craft-parts lifecycle (CRAFT-89, CRAFT-367, CRAFT-357) charmcraft merged Integrated the craft-parts lifecycle to execute the charm builder via a craft-parts charm build plugin. Merged after two approvals and passing CI checks. Author plans to refactor plugin-level transformations in a follow-up.
75%
#2073 fix(models/project): make no parts error explicit charmcraft merged Merged fix enforcing at least one part in platform charm declarations, resolving an edge case where missing parts were previously uncaught. Closes #2055 and CRAFT-3851.
73%
#3636 parts: integrate craft-parts (CRAFT-765) snapcraft merged Merged after reviewer approval and passing CI checks. Integrates craft-parts for part validation and lifecycle processing. Modifies 12 files, adding 369 lines and removing 20, fulfilling CRAFT-765.
71%
#125 main: add details to the parts specification error message (CRAFT-512) craft-parts merged Merged enhancement to craft-parts CLI that adds specific validation failure details to invalid parts specification errors. Approved by two reviewers and passed CI checks.
70%