← Back to issue list

`charmcraft build` failing if charm has manifest.yaml

View original Github issue

Metadata

Project
charmcraft
Number
#287
Type
issue
State
closed
Author
mthaddon
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Fixed in master. The crash triggered by pre-existing manifest.yaml files was resolved by validating the manifest and using clean build directories. The tool now returns a clear error instead of crashing when conflicting files are detected.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#249 `charmcraft build` will let you build a charm that won't deploy charmcraft closed Closed and superseded by issue #27. The charmcraft build validation gap was consolidated into a tracking issue for implementing build-time sanity checks on config.yaml and actions.yaml.
77%
#1160 `charmcraft pack` does not recognize updated `charmcraft.yaml` file charmcraft open charmcraft pack ignores updated build-snaps channel in charmcraft.yaml without a clean; tracked as a craft-parts bug (canonical/craft-parts#496, still open) awaiting a dependency patch release to pull into charmcraft.
72%
#514 `charmcraft build` silently omits files called out in `charmcraft.yaml` if executed from an external directory charmcraft closed Fixed in PR #525. Resolved a bug where charmcraft build and pack silently omitted glob-patterned files when run externally. The fix corrects path misalignment between Charmcraft and the parts processor, ensuring proper glob expansion.
71%
#1747 Failed to run the build script for part 'charm' charmcraft closed Build script failure during charmcraft pack was resolved. The issue was closed after the maintainer acknowledged the report and merged the fix in PR #1751.
70%