Skip to content

Rename classic ValueArgument.annotation to attributes #228

Description

@DamianReeves

Problem

ValueArgument in the classic IR names its value-attribute payload annotation:

crates/morphir-core/src/ir/classic/value.rs

That payload is the classic attribute type parameter (VA), the same slot a tagged value node carries and that v4 spells as attributes. The name annotation collides with the v4 annotations list, which is a different member. That list lives only on specifications and names fully qualified values. The classic field is not that list.

The classic JSON form is the positional tuple [name, payload, type]. The field name is not on the wire.

Change

Rename ValueArgument.annotation to ValueArgument.attributes.

Update the struct, its serializer and deserializer, and the constructors that set the field:

  • crates/morphir-core/src/ir/classic/value.rs
  • crates/morphir-python-binding/src/ir/classic.rs
  • crates/morphir-mck-adapter/src/testee.rs
  • crates/morphir-rust-binding/src/frontend/values.rs

Leave the serialized tuple unchanged. Do not rename v4 annotations, and do not rename Gleam or Python source-annotation fields that happen to use the same word.

Done when

Classic value parameters read attributes in Rust, and classic JSON fixtures still decode as [name, payload, type].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions