Skip to content

Entities with positional arguments, whose arguments are keyword lists cannot be set. #107

@jimsynz

Description

@jimsynz

Describe the bug

Given an entity which takes a keyword list as it's first argument:

%Spark.Dsl.Entity{
  name: :example,
  args: [:my_options],
  schema: [
     my_options: [
      type: :non_empty_keyword_list,
      required: true
     ]
  ]
}

Attempting to use it in a DSL like so:

example marty: :mcfly

Will raise an error about there being no option named :marty in the entity's schema.

Expected behavior
A clear and concise description of what you expected to happen.

It should return the built entity with [{:marty, :mcfly}] in the :my_options field.

Additional context
Discussed in Slack in the context of adding a load entity to Ash.Reactor action steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions