Skip to main content

Module warn

Module warn 

Source
Expand description

What a parse has to say about declarations that still work but should not be used.

A deprecated flag, command, or environment alias reaches help and completion descriptions already. This is the other half: telling the person who just used one, which is the only thing that actually moves anybody off an old spelling.

Nothing here prints. A library that writes to stderr cannot be used by anything with an opinion about output, and mise queues its deprecations until its logging is up — the same rule usage_config resolution follows. parse(), which is the process, renders them; every other entry point hands them back.

Every field borrows the static metadata tables, so a warning allocates nothing. The Vec a caller passes in only allocates if something was actually deprecated, and an entry point that was not asked for warnings never collects any.

Structs§

Warning
One thing a command line used that its own spec says not to use any more.

Enums§

WarningKind
The kinds of deprecation a parse can run into.

Functions§

compare
Order two versions, or None if either is not a version this can read.
render_warning
What a caller should print for one warning, without the renderer that colours it.
render_warnings
Every warning, in the order they were collected.
retain_reached
Drop the warnings a CLI at version has not reached yet.
version_reaches
Whether a CLI at current has reached the release a deprecation starts warning at.