From 10148adc3150a58bf3597d1f998c290b0c2987fe Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Sun, 22 Oct 2023 20:28:06 +0100 Subject: [PATCH] contributing: Add section about release versions and deprecation Picked up from a stale PR and corrected to state TBD. Co-authored-by: Steven Roose @stevenroose --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2472e0260..d9139bacc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,6 +125,18 @@ adhere to the ideas presented in the following two blog posts: - [How to Write a Git Commit Message](https://cbea.ms/git-commit/) - [Write Better Commits, Build Better Projects](https://github.blog/2022-06-30-write-better-commits-build-better-projects/) +### Deprecation and Versioning + +Whenever any part of your code wants to mention the version number the code will +be released in, primarily in deprecation notices, you should use the string +`TBD` (verbatim), so that the release preparation script can detect the +change and the correct version number can be filled in in preparation of the +release. + +```rust + #[deprecated(since = "TBD", note = "use `alternative_method()` instead")] +``` + ### Peer review Anyone may participate in peer review which is expressed by comments in the pull