Stream: ideas

Topic: Idea for interim Roc package management


view this post on Zulip Luke Boswell (Aug 02 2023 at 00:52):

  1. Hardcode a list of publicly available packages in the Roc repository using JSON something like;
[
    {"name": "hasnep/roc-math", "repository-url": "https://github.com/Hasnep/roc-math" , "package-url": "https://github.com/Hasnep/roc-math/releases/download/v0.0.1/7Yv7iomNIZib-liFOqrf2TU5JlPFGsxgUawQ7cBx3ns.tar.br", "documentation-url": "https://hasnep.github.io/roc-math", "short-description": "Mathematical functions and constants in Roc", "license": "UPL v1.0"},
    {"name": "lukewilliamboswell/roc-json", "repository-url": "https://github.com/lukewilliamboswell/roc-json" , "package-url": "https://github.com/lukewilliamboswell/roc-json/releases/download/0.1.0/xbO9bXdHi7E9ja6upN5EJXpDoYm7lwmJ8VzL7a5zhYE.tar.br", "documentation-url": "https://lukewilliamboswell.github.io/roc-json/", "short-description": "Roc Decoder and Encoder for JSON data", "license": "UPL v1.0"},
]
  1. Make a single sub-command available in the roc CLI to make using these packages easy.
  1. Note future changes, usch as to the module header, may change the way this might work such as roc packages use automatically adding the package to the module header.

  2. Note at least one downside here is that this doesn't support different package versions compatibility with different Roc CLI versions. This is a more complicated problem to solve; and I think it's ok to use a warning or notice that this is only an interim solution.

view this post on Zulip Brendan Hansknecht (Aug 02 2023 at 00:59):

I would be minorly concerned about accidentally causing someone to download malicious code. If they are directly listed in the roc repo and downloadable by the cli people will likely assume they are vetted. If we are vetting them, it may lead to cases where people feel left out because we didn't add their package.

view this post on Zulip Brendan Hansknecht (Aug 02 2023 at 01:00):

Personally would rather have an awesome roc repo and maybe a python script (or roc script?) or something that does this work.

view this post on Zulip Brendan Hansknecht (Aug 02 2023 at 01:00):

Though maybe I am overly worried

view this post on Zulip Anton (Aug 02 2023 at 08:01):

I agree that an awesome roc repo seems like a better place for this.
At this time I'm also not sure a CLI tool would be better than a nicely organized markdown file on github.

view this post on Zulip Pearce Keesling (Aug 02 2023 at 12:40):

You could behave like cocoapods and separate the "repo" from the tool. So then there can be an awesome roc repo that has part 1 and then you can just point your local roc at that. Then when it comes time for something more official you can just switch where you point. Or users could choose to use their own internal one

view this post on Zulip Luke Boswell (Aug 04 2023 at 03:46):

Thank you everyone for the feedback. I currently maintain this Roc Awesome page and will continue to do that for now. My main line of thinking was how will newcomers easily find packages they can use, for e.g. doing this years AoC challenges. So hopefully we can have a good experience for then. I'm happy to wait for the official package manager, just thought I might throw an idea out there.


Last updated: Jun 16 2026 at 16:19 UTC