-
Notifications
You must be signed in to change notification settings - Fork 1k
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
FreeBSDLike: Remove obsolete constants in version 1.0.0 #1833
Conversation
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. |
There was a problem hiding this 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.
#[doc(hidden)] | ||
pub const CTL_P1003_1B_MAXID: ::c_int = 26; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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 .
☔ The latest upstream changes (presumably #1844) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #2898) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you squash the commits? LGTM after that
I should be able to merge this after CI gets fixed. @asomers could you ack the change? |
Fixes #454