Skip to content

Commit

Permalink
doc: explain deprecation process (#22568)
Browse files Browse the repository at this point in the history
  • Loading branch information
peppergrayxyz authored Oct 18, 2024
1 parent ce8f621 commit 891a8bc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5690,6 +5690,23 @@ pub mut:
Function/method deprecations:
Functions are deprecated before they are finally removed to give users time to migrate their code.
Adding a date is preferable in most cases. An immediate change, without a deprecation date, may be
used for functions that are found to be conceptually broken and obsoleted by much better
functionality. Other than that setting a date is advisable to grant users a grace period.
Deprecated functions cause warnings, which cause errors if built with `-prod`. To avoid immediate
CI breakage, it is advisable to set a future date, ahead of the date when the code is merged. This
gives people who actively developed V projects, the chance to see the deprecation notice at least
once and fix the uses. Setting a date in the next 30 days, assumes they would have compiled their
projects manually at least once, within that time. For small changes, this should be plenty time.
For complex changes, this time may need to be longer.
Different V projects and maintainers may reasonably choose different deprecation policies.
Depending on the type and impact of the change, you may want to consult with them first, before
deprecating a function.
```v
// Calling this function will result in a deprecation warning
Expand Down

0 comments on commit 891a8bc

Please sign in to comment.