Stream: ideas

Topic: improve filename visibility in error message


view this post on Zulip Anton (Jan 12 2024 at 11:22):

It can be easy to miss which filename an error is about because it's way off to the side.

── WEIRD IMPORTS ────────────────────────────────────────────── BinaryTree.roc ─

I am partway through parsing a header, but I got stuck here:

10│      ]
          ^

I am expecting the imports keyword next, like

    imports [Animal, default, tame]

Shall we center the filename like below?

── WEIRD IMPORTS ─────────────  BinaryTree.roc  ─────────────────────────────────

I am partway through parsing a header, but I got stuck here:

10│      ]
          ^

I am expecting the imports keyword next, like


    imports [Animal, default, tame]

view this post on Zulip Isaac Van Doren (Jan 12 2024 at 14:03):

To me it looks very weird centered. What if it was right next to the error message name instead?

view this post on Zulip Fabian Schmalzried (Jan 12 2024 at 14:16):

── WEIRD IMPORTS in BinaryTree.roc  ────────────────────────────────────────────

I am partway through parsing a header, but I got stuck here:

10│      ]
          ^

I am expecting the imports keyword next, like


    imports [Animal, default, tame]

view this post on Zulip Anton (Jan 12 2024 at 18:40):

Excellent suggestion @Fabian Schmalzried! I've made #6378 to implement it :)


Last updated: Jun 16 2026 at 16:19 UTC