-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fix Elixir compiler warnings for decreasing ranges without explicit steps #154
base: master
Are you sure you want to change the base?
Fix Elixir compiler warnings for decreasing ranges without explicit steps #154
Conversation
@lau any chance we can get this one released? do you need help or more maintainers for this project? My company would be happy to provide some support |
Oh: https://github.com/lau/tzdata/actions/runs/12745831092/job/36702802217?pr=154#step:5:12 Do we have to differentiate the code between Elixir versions? Which versions are to be supported by the library? |
Thanks for the PR. The issue is that it breaks on older version of Elixir that are not that old. I might have to drop support for older versions of Elixir. Not sure if it's worth it to do right now if it's "only" for something that is deprecated but still works. |
If I researched this correctly, the Maybe we can solve this issue for all Elixir versions with conditional compilation? See effbb45. @lau Would you approve the Github Actions CI workflow once again? |
…y based on Elixir version.
fd9c8ac
to
effbb45
Compare
Aside: the other test failure (https://github.com/lau/tzdata/actions/runs/12745831092/job/36702802574#step:7:17) is not related to my change. It is a doctest that fails because the current result of a |
it is hard deprecated in 1.17 https://hexdocs.pm/elixir/1.17.3/changelog.html#4-hard-deprecations (though it s not unsupported since but --warning-as-errors will fail for your library in CI ) I would agree that having a compile time fix as proposed would be great! We see tons of warning in our production system that we cannot remove |
Any plans to merge this @lau ? |
@lau any update on this? again ,I am happy to help doing maintainer work with my company but would be nice to remove these constant warning in our production server |
Issue
Elixir 1.17 and 1.18 deprecated using decreasing Ranges without explicit steps.
See https://hexdocs.pm/elixir/1.17/changelog.html#4-hard-deprecations:
And https://hexdocs.pm/elixir/1.18/changelog.html#4-hard-deprecations:
Using implicit decreasing Ranges gives warnings like these:
Resolution
Use explicit
//-1
step for decreasing Ranges.