@@ -36,7 +36,7 @@ With that in mind, the steps for adding a new API are:
36
36
4 . Wait for CI to pass, fixing errors.
37
37
5 . Wait for a merge!
38
38
39
- ### Test before you commit
39
+ ## Test before you commit
40
40
41
41
We have two automated tests running on [ GitHub Actions] ( https://github.com/rust-lang/libc/actions ) :
42
42
@@ -46,7 +46,23 @@ We have two automated tests running on [GitHub Actions](https://github.com/rust-
46
46
2 . Style checker
47
47
- ` rustc ci/style.rs && ./style src `
48
48
49
- ### Releasing your change to crates.io
49
+ ## Breaking change policy
50
+
51
+ Sometimes an upstream adds a breaking change to their API e.g. removing outdated items,
52
+ changing the type signature, etc. And we probably should follow that change to build the
53
+ ` libc ` crate successfully. It's annoying to do the equivalent of semver-major versioning
54
+ for each such change. Instead, we mark the item as deprecated and do the actual change
55
+ after a certain period. The steps are:
56
+
57
+ 1 . Add ` #[deprecated(since = "", note="")] ` attribute to the item.
58
+ - The ` since ` field should have a next version of ` libc `
59
+ (e.g., if the current version is ` 0.2.1 ` , it should be ` 0.2.2 ` ).
60
+ - The ` note ` field should have a reason to deprecate and a tracking issue to call for comments
61
+ (e.g., "We consider removing this as the upstream removed it.
62
+ If you're using it, please comment on #XXX").
63
+ 2 . If we don't see any concerns for a while, do the change actually.
64
+
65
+ ## Releasing your change to crates.io
50
66
51
67
Now that you've done the amazing job of landing your new API or your new
52
68
platform in this crate, the next step is to get that sweet, sweet usage from
0 commit comments