Skip to content

plug_app example doesn't compile w/Elixir 1.18.4 #688

@rlipscombe

Description

@rlipscombe

Specifically, this line:

        name: %Schema{type: :string, description: "User name", pattern: ~r/[a-zA-Z][a-zA-Z0-9_]+/},

results in this error:

== Compilation error in file lib/plug_app/schemas.ex ==
** (ArgumentError) cannot inject attribute @schema into function/macro because cannot escape #Reference<0.3066655214.653918209.71876>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity
    (elixir 1.18.4) lib/kernel.ex:3777: Kernel.do_at_escape/2
    (elixir 1.18.4) expanding macro: Kernel.@/1
    lib/plug_app/schemas.ex:6: PlugApp.Schemas.User.schema/0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions