← Back to issue list

Provide a way for apps to warn users about deprecated features.

View original Github issue

Metadata

Project
craft-cli
Number
#266
Type
issue
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Feature request for a deprecation-warning API on the Emitter (message, docs link, optional error version, once-per-run, disableable). Core warning() method was added in PR #358; extra features remain unimplemented. Inactive ~1.5 years.

Suggested action: close stale

Reason: The core ask — a warning() method on the Emitter — was implemented in PR #358 (commit 4736b39), which closed craft-cli#256 'Add emit.warning()', and the method now exists in craft_cli/messages.py. The remaining enhancements (docs link, version param, once-per-run dedup, disable switch) are unimplemented, but the issue has had no maintainer engagement for ~1.5 years (only an auto-generated Jira bot comment), so it is stale and the main deliverable exists; the leftover enhancements can be re-filed if still wanted.

Impact: 35 Quick Win: 22.75 Staleness: 75 Complexity: 35 Confidence: 72 Support Request: 0

Issue body

### What needs to get done Similar to `CraftError` but this would be a way to alert users that something is deprecated and will be removed in a future release of the app. Ideally, it would be something equivalent to `warnings.warn()`, perhaps a `warning()` method on the `Emitter`, that gets: 1. A warning message for the user (that will be emitted permanently to stderr) 2. A link to documentation about the change. 3. (Optionally) a version in which the warning will become an error. This particular warning should only be emitted once per application run, and the app should be able to disable these warnings. (e.g. if an app is going to run in managed mode, the outer version can silence its own warnings.) ### Why it needs to get done Currently applications either implement this themselves or just use `emit.progress` with `permanent=True`, but this would help the app have a consistent way to do it.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 22.75
Staleness: 75
Complexity: 35
Confidence: 72
Support Request: 0
close stale Feature request for a deprecation-warning API on the Emitter (message, docs link, optional error version, once-per-run, disableable). Core warning() method was added in PR #358; extra features remain unimplemented. Inactive ~1.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 65
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Feature request to add a standardized deprecation warning mechanism for apps, similar to Python's warnings.warn(). Currently unlabelled and awaiting triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 45
Confidence: 75
Support Request: 10
needs triage Feature request to add a deprecation warning mechanism to the Emitter, similar to warnings.warn(), for consistent app-level deprecation handling. Unassessed and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 20
Confidence: 60
Support Request: 5
needs triage Proposes a consistent warning method on the Emitter to alert users about deprecated features, supporting doc links, version thresholds, single emission per run, and silencing. Open and inactive for over 220 days, awaiting triage and implementation.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-cli#358 (confidence 85%)

    Merged PR 'feat(emitter): add warning method' added Emitter.warning() to craft_cli/messages.py, implementing the core of this request.

  • Related To: craft-cli#256 (confidence 80%)

    Closed issue 'Add emit.warning()' that tracked the warning method implementation; resolved by PR #358.

Related issues

No related issues found above the similarity threshold.