oxidecomputer / oxidecomputer/humility

arrays are not supported by `humility hiffy`

Open
#284 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

I have an Idol function specified by

        "get_power_state": (
            doc: "Get the power state of all ports.",
            reply: Result(
                ok: "[PowerState; 32]",
                err: CLike("TransceiversError"),
            ),
            encoding: Ssmarshal
        ),

But when I try to use that I get a runtime error from humility hiffy

humility hiffy failed: no type for Transceivers.get_power_state: Result { ok: AttributedTy { ty: Ty("[PowerState; 32]"), recv: FromBytes }, err: CLike(Ty("TransceiversError")) } (as basetype: "expected [PowerState; 32] to be a basetype"; as enum: "expected enum not found"; as struct: "expected structure not found"; as REPLY: "expected structure Transceivers_get_power_state_REPLY not found")

Contributor guide

No contributing guide indexed for this repository

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 with the humility hiffy command and trace how the Result { ok: "[PowerState; 32]" ... } reply type is classified, using the reported runtime error as the initial failure. Done means an Idol reply containing a fixed-size array such as [PowerState; 32] is accepted instead of producing the basetype, enum, struct, or REPLY errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.