`charmcraft build` failing if charm has manifest.yaml
Metadata
Current evaluation
Builds stopped crashing on an existing manifest.yaml after Charmcraft added manifest validation and switched charm builds to clean directories.
Resolution: closed resolved
Reason: The maintainer confirmed before closure that the fix was already on master: Charmcraft validates manifest.yaml and builds in clean directories. The regression was introduced by #281, which added automatic manifest generation.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I'm seeing the following error trying to build a charm with a manifest.yaml: https://pastebin.ubuntu.com/p/dzMkySj6dT/
```
$ snap info charmcraft
name: charmcraft
summary: The charming tool
publisher: Canonical✓
store-url: https://snapcraft.io/charmcraft
license: Apache-2.0
description: |
Charmcraft provides a streamlined, powerful, opinionated, and
flexible tool to develop, package, and manage the lifecycle of Juju
charm publication, focused particularly on charms written within the
Operator Framework.
It is still in heavy, initial development and so a lot is still To
Be Done. However it is already useful, and already simplifies the
life of the charmer.
commands:
- charmcraft
snap-id: gcqfpVCOUvmDuYT0Dh5PjdeGypSEzNdV
tracking: latest/edge
refresh-date: today at 14:05 CEST
channels:
latest/stable: –
latest/candidate: –
latest/beta: 0.9.0 2021-03-11 (312) 10MB -
latest/edge: 0.9.0+43.gfe2d065 2021-04-15 (357) 10MB -
installed: 0.9.0+43.gfe2d065 (357) 10MB -
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Builds stopped crashing on an existing manifest.yaml after Charmcraft added manifest validation and switched charm builds to clean directories. | |
| stealth/space-bunny-alpha | — | closed resolved | Build failures involving pre-existing manifest.yaml were fixed in master by validating manifests and building in clean directories; PR #281 introduced the conflict. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | charmcraft build crashed when a pre-existing manifest.yaml conflicted with machine-generated builds introduced in PR #281. Fixed in master by validating manifest.yaml and using clean build directories to prevent conflicts and crashes. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in master. The build no longer crashes when a charm contains a pre-existing manifest.yaml. The resolution validates the manifest and uses clean build directories to prevent conflicts, removing the need for manual file inclusion. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in master by validating manifest.yaml and using clean build directories. The charmcraft build no longer crashes with pre-existing manifest files, replacing the error with proper validation and isolated build environments. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in master. The build crash from pre-existing manifest.yaml files was resolved by validating the manifest and using clean build directories to avoid conflicts with auto-generated files. |
Update history
No update history recorded yet.
Related work
-
Caused By:
charmcraft#281
(confidence 98%)
Merged shortly before the report; it began generating manifest.yaml and made source inclusion unnecessary.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #249 `charmcraft build` will let you build a charm that won't deploy | charmcraft | closed | Closed by facundobatista as a duplicate, tracking all build-time sanity checks (incl. config.yaml/actions.yaml validity) in the umbrella issue charmcraft#27; later implemented by merged PR #556 (a585aec6). | |
| #1160 `charmcraft pack` does not recognize updated `charmcraft.yaml` file | charmcraft | open | Tracked upstream: charmcraft pack ignores build-snaps channel changes in charmcraft.yaml unless clean is run. Root cause is craft-parts#496 (build-snaps missing from properties_of_interest), still unfixed; charmcraft only needs a craft-parts bump once patched. | |
| #514 `charmcraft build` silently omits files called out in `charmcraft.yaml` if executed from an external directory | charmcraft | closed | Fixed by merged PR canonical/charmcraft#525 (merge commit 0d78f540), which runs the parts lifecycle from the project directory so relative globbed paths resolve during external builds. |