canonical / canonical/craft-cli
Provide a way for apps to warn users about deprecated features.
- Dominant language
- Python
- Stars
- 16
- Forks
- 27
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 12
Description
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.