Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete constants in version 1.0.0 #1833

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kellda
Copy link
Contributor

@kellda kellda commented Jul 24, 2020

Fixes #454

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

So, this is 1.0-breakage and I'll hold off until we're ready to prepare 0.3 or 1.0 like #1794.

Comment on lines 1058 to 1060
#[doc(hidden)]
pub const CTL_P1003_1B_MAXID: ::c_int = 26;
Copy link
Member

Choose a reason for hiding this comment

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

This constant isn't deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

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

But it should be. And in fact, it has been removed in FreeBSD 13. How about we remove it in this PR, and I submit another that deprecates it immediately (a non breaking change)?

Copy link
Member

Choose a reason for hiding this comment

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

Generally I'd like to avoid a breaking change unless it breaks the build. So, the problem here is that we don't have any policies for supported FreeBSD versions like #1412 IIRC. We have hidden the items and added deprecation notes, I feel it's enough here, isn't it? One possible way is to tweak the deprecation notes like "We plan to remove this in 0.2.7x" so that users notice the removal.
Deprecating CTL_P1003_1B_MAXID is welcome, of course.

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, relying on those constants could cause misbehavior at runtime, which IMHO is worse than a broken build, because it's harder to detect. There is precedent for removing similar constants which vary from OS release to OS release: 215f095

Copy link
Member

@JohnTitor JohnTitor Jul 27, 2020

Choose a reason for hiding this comment

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

In 215f095, we told the user to leave a comment in the deprecation notes as I suggested above. But we don't do it yet for CTL_MAXID and others.

Copy link
Contributor

@asomers asomers left a comment

Choose a reason for hiding this comment

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

You should also remove these constants from libc-test/build.rs .

@bors
Copy link
Contributor

bors commented Jul 28, 2020

☔ The latest upstream changes (presumably #1844) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Sep 4, 2022

☔ The latest upstream changes (presumably #2898) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove obsolete constants in version 1.0.0
5 participants