oxidecomputer / oxidecomputer/hubris

Build system should provide a better diagnostic for mispeld region names

Open
#1,179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:wave: good first issue build
Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Description

Currently, if you're using the image_names feature in an app.toml, and you name your app foo but your memory.toml only defines a RAM region for fooh -- e.g. one or the other is a typo -- the diagnostic you get is ... not great:

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', build/xtask/src/config.rs:421:25

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at build/xtask/src/config.rs around line 421 and trace how image_names in app.toml is matched against RAM regions in memory.toml. Reproduce the mismatch between foo and fooh, then make the result report the invalid region name clearly instead of panicking.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.