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

Compiler warnings on main #771

Open
nathany-copia opened this issue Dec 23, 2024 · 2 comments · May be fixed by #772
Open

Compiler warnings on main #771

nathany-copia opened this issue Dec 23, 2024 · 2 comments · May be fixed by #772

Comments

@nathany-copia
Copy link

nathany-copia commented Dec 23, 2024

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)

@nathany-copia
Copy link
Author

I'm looking into this and should have a PR ready in a bit.

@nathany-copia nathany-copia linked a pull request Dec 23, 2024 that will close this issue
2 tasks
@nathany-copia
Copy link
Author

I'm seeing some test failures on main right now: https://github.com/bitwalker/timex/commits/main/

And some different test failures #773 when I update to Elixir 1.18 (#772). Though I haven't checked 1.17 to see if the same test failures happen there.

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 a pull request may close this issue.

1 participant