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

Use explicit steps to remove 1.16 deprecation warning in Cobertura #322

Merged
merged 1 commit into from Apr 1, 2024

Conversation

gitneko
Copy link
Contributor

@gitneko gitneko commented Jan 6, 2024

Since Elixir v1.16 negative slices (steps) to String.slice/2 have been deprecated and throws a warning for each call when running mix coveralls.cobertura.

Example warning:

warning: negative steps are not supported in String.slice/2, pass 31..-1//1 instead

This PR removes the warning by using explicit steps as the warning message recommends. However since this library supports also v1.11, which does not support explicit steps yet, this PR conditionally calls Range.new/3 instead of using x..y//step. Otherwise we would get a syntax error during compilation on v.1.11.

Let me know if there is anything else that needs to be done in this PR.

@parroty parroty merged commit e61a96e into parroty:master Apr 1, 2024
@parroty
Copy link
Owner

parroty commented Apr 1, 2024

Thank you and sorry being late to merge 🙇

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 this pull request may close these issues.

None yet

2 participants