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

Elixir 1.16: negative steps are not supported in String.slice/2, pass 1..-2//1 instead #717

Closed
jfpedroza opened this issue Dec 22, 2023 · 0 comments · Fixed by #718
Closed

Comments

@jfpedroza
Copy link
Contributor

Describe the bug

After updating to Elixir 1.16, compilation fails with the following warning:

warning: negative steps are not supported in String.slice/2, pass 1..-2//1 instead
  (elixir 1.16.0) lib/string.ex:2368: String.slice/2
  (surface 0.11.1) lib/surface/api.ex:641: anonymous fn/2 in Surface.API.generate_props_docs/1
  (elixir 1.16.0) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
  (surface 0.11.1) lib/surface/api.ex:639: Surface.API.generate_props_docs/1
  (surface 0.11.1) lib/surface/api.ex:622: Surface.API.do_generate_docs/2
  (surface 0.11.1) lib/surface/api.ex:73: Surface.API."MACRO-__before_compile__"/2

How to reproduce it

  1. Compile a project with latest surface and latest Elixir

The behavior you expected

No warning

Your Environment

Surface: v0.11.1
LiveView: v0.19.5
Elixir: v1.16.0

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