Stream: beginners

Topic: ✔ How to test local `.tar.br` archive?


view this post on Zulip mainrs (Nov 28 2023 at 23:12):

I used Python to serve the file over https locally, but the roc run command fails with

I was trying to download this URL:

    https://localhost:8000/azbw4D7cGxjGDA_j1a1-7TDJFRf11vbFM0cd0gTAEgc.tar.br

But I encountered a network error:

    error sending request for url (https://localhost:8000/azbw4D7cGxjGDA_j1a1-7TDJFRf11vbFM0cd0gTAEgc.tar.br): error trying to connect: invalid peer certificate: Other(CaUsedAsEndEntity)

Is there any way to run my program without having to host it on GitHub?

view this post on Zulip Brendan Hansknecht (Nov 28 2023 at 23:13):

Probably an issue with using https instead of http?

view this post on Zulip Brendan Hansknecht (Nov 28 2023 at 23:14):

Also, you shouldn't need to bundle a platform to use it locally. Roc can also refer to the main.roc file in a platform and use that locally. If you don't want it to try and build the platform, you can add --precompiled-platform

view this post on Zulip mainrs (Nov 28 2023 at 23:19):

How do I refer my custom platform in my script? Let's say my main platform file is under platform/main.roc and my script I want to run is under examples/logging.roc. I then issue the command roc run ./examples/logging.roc.

view this post on Zulip mainrs (Nov 28 2023 at 23:21):

Ahhh, getting the file paths correct is a pain. It throw some weird error and I thought it only works on https.
The correct path is './api/main.roc'

view this post on Zulip Notification Bot (Nov 28 2023 at 23:21):

mainrs has marked this topic as resolved.

view this post on Zulip Luke Boswell (Nov 28 2023 at 23:26):

When I want to test a .tar.br I usually just make a fork, create a release, and upload the file on GH. Easy enough to remove once I'm done testing. I'm not sure if there is a better way, but this has been working for me.


Last updated: Jul 06 2025 at 12:14 UTC