Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lengau opened this issue Jul 31, 2024 · 1 comment
Open

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

lengau opened this issue Jul 31, 2024 · 1 comment
Labels
Enhancement New feature or request

Comments

@lengau
Copy link
Contributor

lengau commented Jul 31, 2024

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.

@lengau lengau added the Enhancement New feature or request label Jul 31, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3174.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant