maennchen / crontab

Parse Cron Expressions, Compose Cron Expression Strings and Caluclate Execution Dates.
https://hex.pm/packages/crontab
MIT License
91 stars 32 forks source link

Warning on Elixir v1.14 #102

Open thbar opened 2 years ago

thbar commented 2 years ago

I'm doing a bit of preliminary testing with https://github.com/elixir-lang/elixir/releases/tag/v1.14.0-rc.1, and noticed the following warning, so I'm opening an issue to report it :

==> crontab
Compiling 7 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/crontab/scheduler.ex:21: Crontab.Scheduler

Generated crontab app

Apparently not fixed on master:

https://github.com/jshmrtn/crontab/blob/c7641a424abc1191c3bf91ace369350097eb4890/lib/crontab/scheduler.ex#L21

maennchen commented 1 year ago

Fixed by 81bd15abaa954afc8e8f9d1fd5b295fb3bf59139

sergchernata commented 5 months ago

Looks like the warning is still being triggered:

Compiling 7 files (.ex)
    warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
    │
 21 │     @max_runs Application.get_env(:crontab, :max_runs, 10_000)
    │                           ~
    │
    └─ lib/crontab/scheduler.ex:21:27: Crontab.Scheduler (module)
thbar commented 5 months ago

Same here! Maybe we can reopen a new issue @sergchernata?

Hermanverschooten commented 2 months ago

It seems this has been resolved in #116, but there has not been a new release?