Stream: beginners

Topic: Strange error when improperly defining package


view this post on Zulip Zellyn Hunter (Dec 17 2023 at 02:02):

I wanted to start a new "charmap" package, so I figured I'd guess at the syntax, and get the compiler to give me hints about what I was missing / doing wrong.

So I changed

    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7./bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br" }

to

    packages {
        pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7./bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br",
        charmap: "../../charmap/charmap.roc",
    }

and created a file at ../../charmap/charmap.roc with these contents:

package "charmap"

That's definitely gonna be totally wrong, but let's see…

roc dev
thread 'main' panicked at 'There were still outstanding Arc references to module_ids', crates/compiler/load_internal/src/file.rs:1560:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

and then it just hangs…

view this post on Zulip Zellyn Hunter (Dec 17 2023 at 02:03):

What is the best way to report these kinds of errors? Are such reports useful, or are things kinda still in such a state of flux that it's expected to take a while before the rough edges are smoothed down, and triaging individual problems isn't worth it yet?

view this post on Zulip Zellyn Hunter (Dec 17 2023 at 02:06):

Of course, looking at a single package example and changing the file contents to this fixed it:

package "charmap"
    exposes [
    ]
    packages {}

But I thought the error was weird regardless.

view this post on Zulip Brendan Hansknecht (Dec 17 2023 at 05:15):

Something definitely broken with file loading logic there

view this post on Zulip Brendan Hansknecht (Dec 17 2023 at 05:16):

Probably worth just filing an issue with the minimal example.

view this post on Zulip Brendan Hansknecht (Dec 17 2023 at 05:16):

Not sure priority for fixing, but really good to log


Last updated: Jul 06 2025 at 12:14 UTC