-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When I try to use the info generator like so:
defmodule Pyro.Info do
@moduledoc "Introspection for pyro."
use Spark.InfoGenerator, extension: Pyro.Component, sections: [:global, :components]
I get the following error:
error: invalid quoted expression: %{}
Please make sure your quoted expressions are made of valid AST nodes. If you would like to introduce a value into the AST, such as a four-element tuple or a map, make sure to call Macro.escape/1 before
└─ deps/spark/lib/spark/info_generator.ex
== Compilation error in file lib/pyro/info.ex ==
** (CompileError) deps/spark/lib/spark/info_generator.ex: cannot compile file (errors have been logged)
(stdlib 6.0) lists.erl:2343: :lists.mapfoldl_1/3Runtime
Elixir v1.17.0-rc.1 (OTP 27)
Erlang 27.0
OS Arch BTW
Spark 2.1.24
Additional context
I suspect it could either be related to this schema that is an option on all sections/entities:
defmodule Pyro.Schema.Variable do
@moduledoc false
@schema [
type: {:map, :atom, :any},
default: %{},
doc: "variables to merge into scope"
]
@doc false
def schema, do: @schema
endOr possibly this struct property default that I add to all entities:
defstruct [
# ...
variables: %{}
]Those are the only ways I'm using %{} in the schema.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working