Make tidy::Version public - #160932
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
Why was this reviewer chosen?The reviewer was selected based on:
|
| mod version; | ||
| use regex::Regex; | ||
| use version::Version; | ||
| pub use version::Version; |
There was a problem hiding this comment.
Suggestion: please add a comment here that e.g. features-status-dump is using this, otherwise it's easy to think this is a dead re-export.
There was a problem hiding this comment.
There is currently no in-tree use of Version (as it is not yet public). features-status-dump just serialises the features to JSON and has no use for this. unstable-book-gen could use it to show when certain compiler flags were introduced, if rustc -Zhelp would print that, but currently doesn't and probably won't.
The main use for exporting Version is for the tool that I'm building, where it would allow users to filter on features introduced before/after a certain version. If you prefer to instead only re-export if there's an in-tree crate using it, I can look into making my tool an extension of features-status-dump instead, and add this change as part of that PR.
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
The tidy library in
src/tools/tidyis used to implement thetidytool, but is also used by other in-tree crates likefeature-status-dumpto analyze which features are defined in the project. This PR makes theVersionstruct public. This has the effect of being able to construct a version usingVersion::from_str("1.80.0").unwrap(). This can then be used to compare (via the already implemented PartialEq trait) the version where a feature was introduced against a user-provided value, rather than only against other features' versions.I would like this change because I am working on a tool to filter features for several metrics (stability, first version, activity of tracking issue, etc) to help find abandoned features that need someone to push to stabilize them.
This is my first PR here. I hope it is welcome.