Skip to content

docs: Better document breaking change policy and recommended usage#5179

Open
tgross35 wants to merge 1 commit into
rust-lang:mainfrom
tgross35:docs-update
Open

docs: Better document breaking change policy and recommended usage#5179
tgross35 wants to merge 1 commit into
rust-lang:mainfrom
tgross35:docs-update

Conversation

@tgross35

Copy link
Copy Markdown
Contributor

For a while there has been an informal policy about what is and isn't allowed regarding breaking changes, but it hasn't been written down anywhere. This is an attempt to start to give our users some more concrete expectations, documented in the "Stability Expectations" section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to give actionable suggestions about how to avoid breakage and other problems.

Closes: #5018

For a while there has been an informal policy about what is and isn't
allowed regarding breaking changes, but it hasn't been written down
anywhere. This is an attempt to start to give our users some more
concrete expectations, documented in the "Stability Expectations"
section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to
give actionable suggestions about how to avoid breakage and other
problems.

Closes: rust-lang#5018
@tgross35

Copy link
Copy Markdown
Contributor Author

@JohnTitor I still need to re-read through this and make sure it actually makes sense, but I'd love your thoughts here when you get the chance.

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 18, 2026
dybucc added a commit to dybucc/libc that referenced this pull request Jun 18, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great so far, leaving some style comments. Feel free to merge after addressing these nits. Thanks a lot!

View changes since this review

Comment thread src/lib.rs
//! This feature is expected to be removed in libc 1.0. Libraries should instead hash or check
//! equality of only needed fields.
//!
//! - The features `const-extern-function`, `align`, and `use_std` are all deprecated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! - The features `const-extern-function`, `align`, and `use_std` are all deprecated.
//! - The features `const-extern-fn`, `align`, and `use_std` are all deprecated.

Comment thread src/lib.rs
//! relaxed API stability requirements, and API stability is not enforced on tier 3 targets.
//!
//! While this section seems scary, keep in mind that it is meant to cover worst-case scenarios. In
//! practice, breakage is rare and following the above-discussed [Best Practices](#best-practices)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing something but I don't see this section.

Comment thread src/lib.rs
//!
//! # Usage Recommendations
//!
//! `libc` takes a differe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems incomplete.

dybucc added a commit to dybucc/libc that referenced this pull request Jun 19, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
dybucc added a commit to dybucc/libc that referenced this pull request Jun 19, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align docs for breaking change policy

3 participants