Skip to content

crate: annotate unstable *MAX constants#5122

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:_max-deprecation
Open

crate: annotate unstable *MAX constants#5122
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:_max-deprecation

Conversation

@dybucc

@dybucc dybucc commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds documentation. This affects certain symbols. These are often not stable upstream. This causes SemVer-breaking issues. Users may need advice. This patch links to such advice.

Some constants have been ignored. They are issued to sysconf.

POSIX defines clases of constants. They are part of limits.h. Some are runtime invariant. Others are not. Numerical limits have been skipped. Runtime invariant values have been skipped. Pathname variable values have been annotated. Runtime increasable values have been annotated.

POSIX-compliance has been assumed. This is sometimes broken. NetBSD is an example. They define AIO_LIST_MAX as variable [1.] This should be a runtime invariant value. This PR does not handle this.

QNX sources have not been found. Its module has been barely modified. Only some symbols have been taken into consideration. Those correspond with the above POSIX-defined symbols.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@dybucc dybucc changed the title refactor: deprecate *MAX constants fitting rust-lang/libc#3131 refactor: deprecate *MAX constants fitting rust-lang/libc#3131 May 29, 2026
@dybucc dybucc changed the title refactor: deprecate *MAX constants fitting rust-lang/libc#3131 refactor: deprecate *MAX constants fitting #3131 May 29, 2026
@dybucc dybucc force-pushed the _max-deprecation branch 11 times, most recently from 5ee0951 to 3bc30cb Compare May 30, 2026 10:15
@dybucc dybucc marked this pull request as ready for review May 30, 2026 16:19
@rustbot

rustbot commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

Some changes occurred in an OpenBSD module

cc @semarie

Some changes occurred in a NetBSD-like module

cc @semarie

Some changes occurred in a solarish module

cc @jclulow, @pfmooney

@dybucc dybucc force-pushed the _max-deprecation branch 2 times, most recently from cb9c814 to 0141e49 Compare June 4, 2026 07:09
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@dybucc

dybucc commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

CI actually passes. There seems to be an issue with a glob import that is not used, but this has not
been changed in the patch (it's not even part of it, for that matter.) For some reason, rebasing
onto main with dependabot updates has ended up with a warning across all of my open PRs due to
that one (now apparently unused) import.

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 9, 2026
@dybucc dybucc force-pushed the _max-deprecation branch from e284492 to 5e64324 Compare June 15, 2026 15:20
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@tgross35

Copy link
Copy Markdown
Contributor

For updating doc comments like the others, @rustbot author

@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@dybucc dybucc force-pushed the _max-deprecation branch from c6d3aaa to 3292409 Compare June 22, 2026 17:30
@rustbot

This comment has been minimized.

@dybucc dybucc force-pushed the _max-deprecation branch from 3292409 to 7253e3e Compare June 23, 2026 06:58
@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

There were troublesome symbols. Upstrem releases can change them. The
frequency of change is inconvenient. This makes SemVer inconvenient.

Users may need advice. This patch does that.
@dybucc dybucc force-pushed the _max-deprecation branch from 7253e3e to 1a18c7d Compare June 23, 2026 07:01
@dybucc dybucc changed the title refactor: deprecate *MAX constants fitting #3131 crate: annotate unstable *MAX constants Jun 23, 2026
@dybucc

dybucc commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@tgross35 Changes are done. The PR description has changes. It's hopefully clearer.

@rustbot ready

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.

3 participants