ash-project / spark

Tooling for building DSLs in Elixir
MIT License
127 stars 25 forks source link

fix(Spark.Dsl.Entity): Clobbering of optional arguments #41

Closed jimsynz closed 1 year ago

jimsynz commented 1 year ago

It was previously possible to provide multiple values for optional entity arguments and Spark would happily accept them and choose one purely based on the implementation details of the generated macro.

This change re-enables the ability to provide a value for an optional argument as an entity option but validates that a value for this argument isn't provided twice.

Additionally, it provides the same check for providing an optional argument as a keyword option which was previously overlooked.