Out-of-band crate evaluation for 2017-10-13: semver
For additional contribution opportunities, see the main libz blitz thread.
This post is a wiki. Feel free to edit it.
Links
semver
- crates.io: Rust Package Registry
 - GitHub - dtolnay/semver: Parser and evaluator for Cargo's flavor of Semantic Versioning
 - semver - Rust
 - tracking issue: Tracking issue for libz blitz evaluation · Issue #139 · dtolnay/semver · GitHub
 
semver-parser
- crates.io: Rust Package Registry
 - GitHub - steveklabnik/semver-parser: A parser for the semver specification
 - semver_parser - Rust
 - tracking issue: Tracking issue for libz blitz evaluation · Issue #24 · steveklabnik/semver-parser · GitHub
 
Needs your help!
Anything that is not checked off still needs your help! There is no need to sign up or ask for permission - follow any of these links and leave your thoughts:
Guidelines checklist
Legend
[y]= guideline is adhered to, no work needed.[n]= guideline may need work, see comments nearby[/]= guideline not applicable to this crate
Checklist
This document is collaboratively editable. Pick a few of the guidelines, compare the semver crate against them, and fill in the checklist with [y] if the crate conforms to the guideline, [n] if the crate does not conform, and [/] if the guideline does not apply to this crate.
For more details, see
  - [n] Crate name is a palindrome (C-PALINDROME)
   - my_crate backwards is etarc_ym which is not the same as my_crate
Cookbook recipes
Come up with ideas for nice introductory examples of using semver, possibly in combination with other crates, that would be good to show in the Rust Cookbook. Please leave a comment in that issue with your ideas! You don't necessarily have to write the example code yourself but PRs are always welcome.
API guideline updates
What lessons can we learn from
semverthat will be broadly applicable to other crates? Please leave a comment in that issue with your ideas!
Discussion topics
Anything that's not a concrete crate issue yet. We want to eventually promote any topics here into actionable crate issues below.
Version docs
The docs for Version could be improved. What specific things could make them easier to consume?
Range syntax
Does the crate intend to implement the remaining parts of the NPM semver range syntax, like the || operator, whitespace-separated (rather than comma-separated) range sets, and hyphen ranges?
This could be implemented by adding a layer above VersionReq to semver-parser called something like RangeSet that contains a list of VersionReqs. In semver we can change the internals to align with semver_parser::RangeSet instead of semver_parser::VersionReq.
Naming
Should we rename some of the types to match those in the grammar?
Predicate->ComparatorVersionReq->ComparatorSetorRange
Non-exhaustive semver-parser
Types in semver-parser are currently composed of public fields. This makes the set of potentially breaking changes larger. If this isn't desirable then we should make the types non-exhaustive, this can be a private _non_exhaustive: () field.
Crate issues
Issues to file against the
semvercrate.
semver_parser issues to file
- Implement 
Clone,PartialEq,Eq,PartialOrd,Ord,HashforVersionReq - Implement 
Clone,PartialOrd,Ord,HashforVersion - Add examples to items and methods in 
semver_parser. Focus on parsing - Add readme, keywords and categories to 
Cargo.toml - Add 
html_root_urlattribute to crate root - Make structures with public fields non-exhaustive
 - Rename 
PredicatetoComparator - Rename 
VersionReqtoRange 
Bigger items
These are some bigger things that would need to be broken down more to be friendly for contributors. We might want to do them first.
Implementing range sets
- Add a 
RangeSettype that can parse a collection of ranges between||s 
Docs
- Document the 
semver_parsercrate:- What is this crate about?
 - How is it different to 
semver? - Exactly what does it parse?
 
 
semver issues to file
- Use 
?instead ofunwrapin examples - Document error cases on 
Version::parse - Document error cases on 
VersionReq::parse - Turn references to other crate items in prose into links
 - Add keywords and categories to 
Cargo.toml - Fix link to 
docs.rsfor documentation inCargo.toml - Add 
html_root_urlattribute to crate root - Make error types non-exhaustive (or hide variants in a struct using private fields)
 
Bigger items
These are some bigger things that would need to be broken down more to be friendly for contributors. We might want to do them first.
Hiding structure definitions
Versionuses public fields. We should make an effort to hide these and the exact kind of collection fields are stored in
Implementing range sets
- Support the 
||operator on sets ofRanges by makingVersionRequse a range set internally instead of a single range 
How are we tracking?
Pre-review checklist
- Create evaluation thread based on this template
 - Work with author and issue tracker to identify known blockers
 - Compare crate to guidelines by filling in checklist
 - Record other questions and notes about crate
 - Draft several use case statements to serve as cookbook examples
 - Record recommendations for updated guidelines
 
Post-review checklist
- Create new issues and tracking issue on crate's issue tracker
 - Solicit use cases for cookbook examples related to the crate
 - File issues to implement cookbook examples
 - File issues to update guidelines
 - Post all approachable issues to TWiR call for participation thread
 - Update links in coordination thread