Stream: t-cargo/PubGrub

Topic: Thanks from Gleam


view this post on Zulip Louis Pilfold (Apr 18 2021 at 21:39):

Hello friends! Just wanted to leave a quick message to say thank you for the pubgrub-rs library. I've been meaning to implement the algorithm in Rust and you've saved me a lot of time. The library looks lovely and the documentation is delightful. Thanks!

view this post on Zulip Eh2406 (Apr 18 2021 at 22:19):

You are more then welcome! Most of the credit goes to @Matthieu Pizenberg for the wonderful documentation.

view this post on Zulip Eh2406 (Apr 18 2021 at 22:21):

By the way the dev branch is api compatible with v0.2, but a lot faster and using less memory. We will cut a 0.2.1 one of these days.

view this post on Zulip Eh2406 (Apr 18 2021 at 22:24):

Are you able to share about your use case?

view this post on Zulip Matthieu Pizenberg (Apr 18 2021 at 22:47):

Awesome to see those documentation efforts pay off :)
@Louis Pilfold is the author of the Gleam programming language. I've heard a lot of great things about it coming from the elm community.

view this post on Zulip Louis Pilfold (Apr 19 2021 at 10:51):

Matthieu Pizenberg said:

Awesome to see those documentation efforts pay off :)
Louis Pilfold is the author of the Gleam programming language. I've heard a lot of great things about it coming from the elm community.

They're fab docs! And thank you, I'm glad people are enjoying the language, even if everything is a bit rough around the edges at the moment.

view this post on Zulip Louis Pilfold (Apr 19 2021 at 10:52):

Eh2406 said:

Are you able to share about your use case?

Certainly. I've a little API client for Hex, the Erlang ecosystem package manager. https://github.com/gleam-lang/hexpm-rust/
Pubgrub seems to be a good fit for Hex so I intend to add dep resolution to the client for use in the Gleam build tool, so we can provide a better experience than the current hacks on top of the Erlang build tool. It's all very early exploration at the moment, but seems to be going well so far

view this post on Zulip Eh2406 (Apr 19 2021 at 13:25):

That is wonderful! Please keep us in the loop about what is or is not working for you!
As a heads up our support of "Pre-releases" like "1.0.0-alpha.3" is still being designed. After we cut the 2.1, we will be getting started on it.
Also we have a file format for benchmark cases. We currently use a snapshot of all elm packages, as our most realistic benchmark. If you want to generate a file based on your workload, that would be very helpful!

view this post on Zulip Louis Pilfold (Apr 30 2021 at 10:51):

A benchmark sounds good. What would you need here? I just checked the Hex versions endpoint and there 11454 packages with 70684 versions across them.

view this post on Zulip Louis Pilfold (Apr 30 2021 at 11:11):

I've been trying to determine how to support prerelease versions so that they are not matched by ranges. Is this possible? It seems like I will need to copy Range or OfflineDependencySolver to my codebase and specialise it teach it to skip prereleases. Does that sound right?

view this post on Zulip Louis Pilfold (Apr 30 2021 at 13:11):

Oh! I have just spotted the issue. I guess there is no recommended approach currently. Cool I'll play about and see where I get

view this post on Zulip Eh2406 (Apr 30 2021 at 14:20):

For the benchmark, copy the data into a OfflineDependencyProvider and serialize that into a Ron file.
For the prerelease, ether fork the project and modify the Range type OR use the Range trait branch. And figure out what changes get you working. Then MOST importantly report back so we can do something better for 0.3.

view this post on Zulip Louis Pilfold (Apr 30 2021 at 14:56):

OK cool. I'll have to make a little script to pull all the deps for each package from the Hex API so I'll make a note to do this when I have some free time. Does it need to be an OfflineDependencyProvider of Range<SemanticVersion>? I'm not sure that'll work so well because Hex uses preleases so if those are truncated we'll have some duplicate versions
I'll try the trait branch, thanks

view this post on Zulip Eh2406 (Apr 30 2021 at 16:35):

Good point. For now, yes. For the zuse benchmark I just filtered out prerelease versions. But if that is not realistic for your use case, then upload one that has prerelease data, and we can start using it when we merge support for it.


Last updated: Oct 21 2021 at 21:02 UTC