-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to access a Range
's segments
#258
Comments
Yeah this is a bit of a rough edge. Thank you for sharing your use-case! You may find the the uv report implementation interesting and helpful — we have customized the messages quite a bit. I think you can access a range's segments with |
I'll have a look at it for sure, thank you!!
I'm not really that good of a Rustacean so I might be probably missing something, but it doesn't look like
|
Be warned it's quite complicated. Happy to help though.
Hm it's implemented at Lines 835 to 838 in fe65959
|
One remark, it’s possible that gleam still depends on pubgrub 0.2.1 as no new version has been published since that. However, a lot has changed on the default We do not intend to update version 0.2 of the pubgrub crate. It currently is stabilizing to a version 0.3 that would support
|
@mpizenberg thank you for the really helpful answer!! Ideally I'd like to wait for v0.3, do you have a rough date in mind for when we could see a release or is it going to be really far into the future? |
So many deadlines have passed me by, I like the sound they make when they go past, it makes me hesitant to admit to anymore. But according to the document I share with my boss I'm supposed to have the next release out by the end of the year. Though, after committing to that I instead spent my time working on #232 which has been a lot trickier to understand/diagnose than I was expecting. 🤷 If you want to see progress before the official release I may be able to help by:
|
I'd love to start doing alpha releases! Even if the docs aren't ready, this should get us into the process of eventually releasing 0.3. |
whoever does that, it will be a good learning point for improving the upgrade docs. Especially if that’s not Jacob doing the upgrade. |
Thank you so much to everyone who replied! |
This comment was marked as spam.
This comment was marked as spam.
version-ranges is now published as its own crate (https://crates.io/crates/version-ranges), and we're also adding |
The released pubgrub 0.2 uses the |
That's great news! Thank you everyone! Do you have a rough idea of what it might be? So we can plan accordingly. Thanks again |
Both uv and cargo currently used a pinned version based of the dev branch. I think doing an actual release it blocked on someone updating the book (#192 (comment)). |
I see, thank you. Would you be open to the change being ported to the v0.2 branch? Would it be possible to reopen this issue? We still cannot access the range segments. 🙏 |
Yes. We would need to be careful about breaking changes related to As for |
Hello! I ran into a problem while writing some custom error reporting for resolution failure for the Gleam compiler. What I do is I start from a
DerivationTree
, transform it a bit, and report a pretty printed error message showing the failing constraints along with version ranges. For example the following derivation tree:Gets turned into:
One thing I'd like to change is the default look of version ranges once they're printed: for example having
>= 2.0.0 and < 3.0.0
instead of2.0.0 <= v < 3.0.0
; this would look more familiar to a Gleam programmer since it more closely resembles how one would write a version constraint in Gleam.My problem is that the only way I found to turn a
Range<_>
into a string is using the defaultfmt
implementation and since thesegments
field is private I cannot roll my own pretty printing implementation for ranges. Could the package expose a way to access a range's segments?Thank you!
The text was updated successfully, but these errors were encountered: