Skip to content

Compiler warnings on main #771

Open
@nathany-copia

Description

@nathany-copia

Steps to reproduce

Using Timex from this GitHub repository in Elixir 1.18:

{:timex, "~> 3.7", github: "bitwalker/timex", ref: "cc649c7a5", override: true},

Description of issue

  • What are the expected results? no compiler warnings on main in current Elixir versions
==> timex
Compiling 62 files (.ex)
warning: defining a Gettext backend by calling

    use Gettext, otp_app: ...

is deprecated. To define a backend, call:

    use Gettext.Backend, otp_app: :my_app

Then, instead of importing your backend, call this in your module:

    use Gettext, backend: MyApp.Gettext

  lib/l10n/gettext.ex:2: Timex.Gettext (module)

warning: min..max inside match is deprecated, you must always match on the step: min..max//var or min..max//_ if you want to ignore it
  lib/format/datetime/formatter.ex:893: Timex.Format.DateTime.Formatter.width_spec/1

      warning: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead
      │
 1205 │     Module.eval_quoted(__MODULE__, day_quoted, [], __ENV__)
      │            ~
      │
      └─ lib/timex.ex:1205:12: Timex (module)

      warning: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead
      │
 1303 │     Module.eval_quoted(__MODULE__, month_quoted, [], __ENV__)
      │            ~
      │
      └─ lib/timex.ex:1303:12: Timex (module)

    warning: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead
    │
 22 │     Module.eval_quoted(__MODULE__, quoted, [], __ENV__)
    │            ~
    │
    └─ lib/timezone/utils.ex:22:12: Timex.Timezone.Utils (module)

    warning: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead
    │
 42 │     Module.eval_quoted(__MODULE__, quoted, [], __ENV__)
    │            ~
    │
    └─ lib/timezone/utils.ex:42:12: Timex.Timezone.Utils (module)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions