← Back to issue list

`create-lib` command breaks without a metadata.yaml file

View original Github issue

Metadata

Project
charmcraft
Number
#1227
Type
issue
State
closed
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Closed without resolution. The create-lib command fails without metadata.yaml. Maintainer noted this breaks store tests and suggested adding spread tests that do not rely on the store.

Suggested action:

No scores available.

Issue body

### Bug Description Without a `metadata.yaml` file, `charmcraft create-lib` fails. However, it only needs this to get the charm name. ### To Reproduce `charmcraft init` (or with any explicit profile) `charmcraft create-lib mylib` ### Environment N/A ### charmcraft.yaml ```shell N/A ``` ### Relevant log output ```shell (charmcraft) lengau@hyperion:~/Work/Test/charms/tmp$ charmcraft init --profile=kubernetes Charmed operator package file and directory tree initialised. Now edit the following package files to provide fundamental charm metadata and other information: charmcraft.yaml src/charm.py README.md (charmcraft) lengau@hyperion:~/Work/Test/charms/tmp$ charmcraft create-lib mylib Cannot find a valid charm name in metadata.yaml. Check you are in a charm directory with metadata.yaml. Full execution log: '/home/lengau/.local/state/charmcraft/log/charmcraft-20230818-165535.506311.log' ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. The create-lib command fails without metadata.yaml. Maintainer noted this breaks store tests and suggested adding spread tests that do not rely on the store.
qwen/qwen3.6-35b-a3b Fixed. Updated charmcraft create-lib to extract the charm name from charmcraft.yaml instead of requiring metadata.yaml, resolving associated test failures.
qwen/qwen3.6-35b-a3b Closed without a documented fix. The maintainer noted the bug causes libraries and libraries-update store test failures and recommended adding spread tests that do not rely on the store.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. The create-lib failure was not fixed and no pull request was linked. The maintainer suggested alternative testing instead of a fix, indicating abandonment.
qwen3.6-35b-a3b-mtp-q6 Closed without a documented fix. Maintainer noted it caused store test failures and suggested test improvements. The issue appears abandoned.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1228 commands(store): make create-lib work without a metadata.yaml file charmcraft merged Merged updates to the create-lib command, allowing it to operate without a metadata.yaml file. Fixes #1227, progresses #1193, and was approved by two reviewers with passing CI checks across two modified files.
76%