You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of a custom VersionRange class, it would be nice to use a generic Interval or Range class. I have a version of Intervalhere that I'd like to publish as an interval package that could be used. The repo for this package could be kept under the the dart-lang github org.
Then VersionConstraint could have an interval property which returned an Interval<Version>. Then instead of Version implementing VersionConstraint, could have new VersionConstraint.exact(version) whose interval could use Interval.singleton underneath. Then any custom toString() or == would be on VersionConstraint subclasses, and not on the interval itself.
This would of course be a breaking change, but there probably aren't too many consumers of this package yet, just a really big one in pub :).
The text was updated successfully, but these errors were encountered:
One wrinkle is that Interval doesn't handle the semantics of VersionRange.allows disallowing pre-releases at the top-end of the range, so that would need to be overridden still.
I don't think we'd get enough benefit from this to make the migration worth it, nor does it seem like the interval package is actively maintained anymore.
Instead of a custom
VersionRange
class, it would be nice to use a genericInterval
orRange
class. I have a version ofInterval
here that I'd like to publish as aninterval
package that could be used. The repo for this package could be kept under the the dart-lang github org.Then
VersionConstraint
could have aninterval
property which returned anInterval<Version>
. Then instead ofVersion
implementingVersionConstraint
, could havenew VersionConstraint.exact(version)
whoseinterval
could use Interval.singleton underneath. Then any customtoString()
or==
would be onVersionConstraint
subclasses, and not on the interval itself.This would of course be a breaking change, but there probably aren't too many consumers of this package yet, just a really big one in pub :).
The text was updated successfully, but these errors were encountered: