Skip to content

[record_use] Correctness: Support non-string map keys #2715

Closed

Description

@dcharkes

The current JSON structure for package:record_use only supports string keys for MapConstant objects. The keys are serialized directly as strings, while the values are normalized as indices into the constants array. This limits the ability to represent const maps that use other constant types (e.g., int, bool, or other objects) as keys.

Current Format:

{
  "type": "map",
  "value": {
    "key1": 3 
  }
}

Proposed Format options:

{
  "type": "map",
  "value": {
    "1": 3,
    "2": 4
  }
}
{
  "type": "map",
  "value": [
    { "key": 1, "value": 3 },
    { "key": 2, "value": 4 },
  ]
}

Note that this does not allow for an efficient JSON view with #2681, so the map keys need to be eagerly looked up from the constants array on building the view.

Activity

  1. changed the title [-][record_use] Support non-string map keys[/-] [+][record_use] Correctness: Support non-string map keys[/+] on Oct 20, 2025
  2. self-assigned this
    on Feb 3, 2026
  3. moved this from Todo to In Progress in Native Assetson Feb 3, 2026
  4. moved this from In Progress to Done in Native Assetson Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions