Comments (9)
+1. I want to parse a semver and express the implied min/max constraints in a similar constraint syntax (Debian packaging metadata). It'd be real nice if VersionReq
predicates were exposed in some way to prevent me having to duplicate all that parsing logic.
from semver.
It looks like semver-parser provides the ability to introspect into its version of VersionReq, but semver has its own version of VersionReq that doesn't allow introspection.
Could semver just use the types from semver-parser, rather than converting to its own?
from semver.
Could semver just use the types from semver-parser, rather than converting to its own?
I would say yes, but in a slightly different way: they should still convert over, but we should evolve VersionReq
to be more useful.
Now that we've fully converted over, I want to take a hard look at the whole interface, looking towards a 1.0. These kinds of changes are the things I might want to make.
from semver.
@steveklabnik Why the separate types and conversion between them?
from semver.
They're two separate crates, the conversion means that I don't leak the specific semver-parser into semver's external API.
from semver.
Is there a strong reason to keep them separate rather than unifying them?
from semver.
I like small crates, and keeping concerns separate. One crate for one thing; one handles the conversions, the other has all of the logic for comparisons, etc. it feels like the split between -sys and not to me. Plus, there could be other back ends: maybe that nom parser I tried would work better, or LALRPOP.
But! Part of that is the beauty of < 1.0: I'm not actually sure. We'll see.
On Aug 8, 2016, 19:23 -0400, Josh Triplett [email protected], wrote:
Is there a strong reason to keep them separate rather than unifying them?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#59 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AABsio9cOyLsza_0So_cP-amaGhkpa0Hks5qd7pbgaJpZM4GfolK).
from semver.
I don't know how it could be implemented: for now VersionReq
is just a bunch of Predicate
's. For me it's not clear how to get a min and max constrains.
How can VersionReq
be exposed actually?
from semver.
This is now available in 1.0.0. https://docs.rs/semver/1.0.0-rc.1/semver/struct.VersionReq.html
from semver.
Related Issues (20)
- How to sort a list by the latest version HOT 1
- nonzero_leading_trailing_zeros requires rustc 1.53.0 HOT 1
- Error using unstable feature: nonzero_leading_trailing_zeros in nightly rust HOT 2
- Error about an unstable lint HOT 1
- Wildcard VersionReq alongside other requirements HOT 3
- `is_exact`? HOT 2
- Display impl for Version no longer supports padding
- 1.0.4 broke older nightlies HOT 1
- Why is Op non-exhaustive? HOT 1
- Doc/test requests from an audit from a vendor crate bump HOT 1
- Unable to parse v0.0.1-001 HOT 1
- Negation operator HOT 1
- v1.0.8 breaks Send/Sync impls on some public structs HOT 1
- Please yank version 1.0.8 when you get the chance HOT 1
- Implementation for range with multiple look buged when pre-release are not present HOT 1
- `cargo doc` emits errors, but then works anyway
- Error when cargo fuzz HOT 1
- Pre-release requirement not satisfied HOT 2
- `Identifier::new_unchecked()` writes to null pointer on allocation failure HOT 2
- Implement Ord for VersionReq? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.