← Back to issue list

feat: replace create-lib with a deprecation stub

View original Github issue

Metadata

Project
charmcraft
Number
#2851
Type
pull request
State
merged
Author
james-garner-canonical
Labels
—
Created
Updated
Closed

Current evaluation

PR #2851 merged, replacing charmcraft's create-lib implementation with a deprecation stub that exits with an error pointing to https://ubu.link/charmhub-libraries-deprecation instead of hitting a Charmhub API failure.

Resolution: closed resolved

Reason: The PR was approved by three reviewers and merged into main, deleting ~186 lines of create-lib/library code and adding a stub that fails fast with the deprecation error message. Open issue charmcraft#195 (confirmation prompt for create-lib) is now obsolete as a result.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This PR replaces the `create-lib` command's current implementation with a stub that fails early and points users to where they can learn what they should do instead. Since Charmhub no longer accepts the registration of new libraries, the current output of `charmcraft create-lib <lib name>` is: ``` WARNING: Charmhub-hosted charm libraries are deprecated. Go to https://ubu.link/charmhub-libraries-deprecation for more information. Store operation failed: - forbidden: Charm library registration is disabled. See https://ubu.link/charmhub-libraries-deprecation for details. Full execution log: '/path/to/log' ``` (Or if the user isn't logged in, then after the warning they are taken to a login page, and only shown the error afterwards.) Instead, the behaviour is now to cleanly exit with an error, showing: ``` ERROR: New libraries can no longer be registered on Charmhub. Go to https://ubu.link/charmhub-libraries-deprecation for more information. ``` --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [x] I've added or updated any relevant documentation. - [x] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [x] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #2851 merged, replacing charmcraft's create-lib implementation with a deprecation stub that exits with an error pointing to https://ubu.link/charmhub-libraries-deprecation instead of hitting a Charmhub API failure.
stealth/space-bunny-alpha — closed resolved Merged in charmcraft#2851, replacing create-lib with a deprecation stub that immediately explains new Charmhub library registration is disabled.
qwen/qwen3.6-35b-a3b — — Merged. Replaces the create-lib command with a deprecation stub that cleanly exits with an error directing users to Charmhub library deprecation documentation. Approved by three reviewers and passed CI.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Replaces the deprecated create-lib command with a stub that exits cleanly with an error and deprecation link. PR has two approvals, zero unresolved comments, and most CI checks passing. Awaiting maintainer sign-off on documentation.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Replaces the create-lib command with a deprecation stub that exits early with a clear error message and documentation link. Approved by two reviewers, CI mostly passing with a few failing snap tests on specific Ubuntu versions.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Replaces create-lib command with a deprecation stub that exits early with a clear error message. Approved by one reviewer, CI mostly passing with a few OS-specific test failures.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Replaces create-lib command with a deprecation stub that exits cleanly with an error and link. Currently passing CI, awaiting maintainer review with no comments or approvals yet.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 85
needs review Replaces the deprecated create-lib command with a stub that exits early with a clear error message and deprecation link. Currently awaiting maintainer review and pending CI checks.
qwen/qwen3.6-35b-a3b
Staleness: 0
Complexity: 10
Confidence: 80
needs review Replaces the create-lib command with a deprecation stub that exits early and directs users to documentation. Currently pending maintainer review with one failing lint check.

Update history

Date Change
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
created

Related work

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

    Open request to add a confirmation prompt to create-lib; made moot by this stub since the command now exits before any confirmation could be shown.

Related issues

Issue Project State Summary Similarity
#2691 feat(charmlibs): warn of deprecation on all charmlibs commands charmcraft merged Merged PR #2691 in commit b93737a1, adding permanent deprecation warnings to all Charmhub-hosted charmlibs-related commands with a link to migration guidance.
72%