Skip to content

Compilation error with OTP-28 #259

@GRoguelon

Description

@GRoguelon

Hi,

I have tried to upgrade my project to OTP 28.0.1 and Elixir 1.18.4-otp-28.

I got this error which prevents me to complete compilation:

Generating MyProject.Cldr for 2 locales named [:en, :und] with a default locale named :en

== Compilation error in file lib/my_project/cldr.ex ==
** (ArgumentError) cannot escape #Reference<0.1510396911.1037172739.95748>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity
    (elixir 1.18.4) src/elixir_quote.erl:554: :elixir_quote.argument_error/1
    (elixir 1.18.4) src/elixir_quote.erl:462: :elixir_quote.do_quote_simple_list/3
    (elixir 1.18.4) src/elixir_quote.erl:462: :elixir_quote.do_quote_simple_list/3
    (elixir 1.18.4) src/elixir_quote.erl:150: :elixir_quote.do_escape/2
    (elixir 1.18.4) src/elixir_quote.erl:170: :elixir_quote."-do_escape/2-lc$^1/1-0-"/3
    (elixir 1.18.4) src/elixir_quote.erl:171: :elixir_quote."-do_escape/2-lc$^1/1-0-"/3
    (elixir 1.18.4) src/elixir_quote.erl:171: :elixir_quote.do_escape/2
    my_project/lib/my_project/cldr.ex:1: (file)

I have this module:

defmodule MyProject.Cldr do
  use Cldr, locales: [:en], default_locale: :en, providers: [Cldr.Number, Cldr.Calendar, Cldr.DateTime, Cldr.List]
end

I had a similar issue with my file endpoint.ex where I had a Regex in a module attribute, I tried to review the file lib/cldr/cldr.ex but I couldn't identify any of the deprecated changes of OTP-28.

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