Giter Club home page Giter Club logo

Comments (9)

KodrAus avatar KodrAus commented on July 20, 2024

The serde feature is also already optional in semver.

from semver.

steveklabnik avatar steveklabnik commented on July 20, 2024

semver-parser has its own dependents too: https://crates.io/crates/semver-parser/reverse_dependencies

One could maybe argue that Version should move into semver-parser, and that semver would re-export it, but basically, any time you want to parse semver versions, but you don't care about things like ranges, only semver-parser is needed.

Basically, I like small, focused crates.

from semver.

KodrAus avatar KodrAus commented on July 20, 2024

This is also discussed in #59

from semver.

KodrAus avatar KodrAus commented on July 20, 2024

I think because semver_parser hasn't received the same doc treatment as semver it feels like an implementation detail rather than a crate in its own right. And an obvious thing to want to do with implementation details is hide them.

So I think if we beef the docs out then semver_parser will stand on its own better.

from semver.

udoprog avatar udoprog commented on July 20, 2024

@steveklabnik I'd also like to see this happen. The two crates are currently tightly coupled so that releases must be carefully coordinated (e.g. blocks things like #151 from happening between two releases).

I've spent time working through the existing dependents.

version-sync (renamed duplicate of check-versions)

Uses semver-parser to parse a VersionReq, then implements the compatibility check manually:

https://github.com/mgeisler/version-sync/blob/master/src/lib.rs#L119

Naively it looks like this use-case could be much better served using this crate.
By providing a custom matches implementation it effectively undermines the behavior of this crate.

libvpx-native-sys

Doesn't appear to be using semver-parser any more?

debcargo

Primarily used to parse the VersionReq, then inspect the structure of it.

Used here: https://anonscm.debian.org/git/pkg-rust/debcargo.git/tree/src/debian/dependency.rs

It's worth noting that this uses semver-parser because the structure of VersionReq is private in this crate, but not in semver-parser.
Making the predicates public, or adding accessor methods, would permit them to move.

cargo-tally

Also seems to be a case of providing access to internal structures.

Conclusion

semver-parser could be merged into semver if semver provided access to currently private parts of Version, VersionReq.

from semver.

udoprog avatar udoprog commented on July 20, 2024

So I've been needing some of the new semver support (especially #151) for a while, which has blocked me from publishing new versions of my application to crates.io. The slow moving progress on this has caused me to incorporate semver as an internal library (called reproto-semver) which includes all the changes I need.

This effectively unblocks me, and I'm happy to wait until a new version of semver becomes available which does what I need. But I'd like to highlight that I took the approach of merging the parser. This caused a significant reduction in the amount of boilerplate used to communicate between the two crates. The translation was also very straight forward since there's almost a 1:1 mapping between the two.

If you'd like some inspiration of where this project could go if you choose to take this advice of merging the crates, please check out: https://github.com/reproto/reproto/tree/master/lib/semver

from semver.

steveklabnik avatar steveklabnik commented on July 20, 2024

Sorry about that! I'd been focusing on semver-parser, but then the holidays happened; I hope to have 1.0 of both libs out by the end of the month.

from semver.

udoprog avatar udoprog commented on July 20, 2024

Hey no worries! Take the time you need and I'm here to help if you want it :).

from semver.

dtolnay avatar dtolnay commented on July 20, 2024

This has happened in semver 1.0.0.

from semver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.