Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jimsynz opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jimsynz
Copy link
Contributor

jimsynz commented Sep 4, 2024

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.

@jimsynz jimsynz added the bug Something isn't working label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant