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

Proof of Concept Dsl for Entities and Sections - WIP #48

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

erikareads
Copy link
Contributor

Contributor checklist

  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@erikareads
Copy link
Contributor Author

Initial work for #47

@jimsynz
Copy link
Contributor

jimsynz commented Aug 7, 2023

Question: rather than:

sections = Spark.load(Impl)

use Spark.Dsl.Extension,
  sections: sections

Is it possible to do something like this instead?

use Spark.Dsl.Extension do
  entity ...
end

@erikareads
Copy link
Contributor Author

Question: rather than:

sections = Spark.load(Impl)

use Spark.Dsl.Extension,
  sections: sections

Is it possible to do something like this instead?

use Spark.Dsl.Extension do
  entity ...
end

We probably can't do use Spark.Dsl.Extension that way for backward compatibility reasons,
however, since we're introducing use Spark for the meta-DSL anyway,
there's nothing stopping us from going:

defmodule MyNewDSL do
  use Spark
  entity ...
  
   section ...

   transformer ...

   patch ...
end

Since use Spark is new, there shouldn't be any backwards compatibility concerns.

I would need to investigate what would be required to provide that API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants