oxidecomputer / oxidecomputer/typify

Enum Name Collision

Open
#177 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

naming
Dominant language
Rust
Stars
898
Forks
114
Avg merge
4h 18m
Merged PRs (30d)
14

Description

In the Vega example, an enum with __count__ and count outputs:

pub enum AggregateTransformOpsVariant0ItemVariant0 {
    #[serde(rename = "count")]
    Count,
    #[serde(rename = "__count__")]
    Count,
   // ...
}

I'm looking into whether __count__ is a spec bug and not meant to be exposed 😅 , but from a code gen perspective figuring out what to do with these collisions is probably worthwhile.

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

Reproduce the Vega example and inspect the code-generation path that turns the colliding enum values into Rust variants. First determine the intended handling for count and __count__, including whether the schema exposes both values. Done means the chosen collision behavior is implemented and covered by a regression test for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.