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

chore(elixir): Negative steps are not supported in String.slice/2, #5386

Open
big-r81 opened this issue Jan 7, 2025 · 0 comments
Open

chore(elixir): Negative steps are not supported in String.slice/2, #5386

big-r81 opened this issue Jan 7, 2025 · 0 comments

Comments

@big-r81
Copy link
Contributor

big-r81 commented Jan 7, 2025

Description

When running the Elixir test UUIDsTest, there is the following warnings are issued:

UUIDsTest [test/elixir/test/uuids_test.exs]
  * test no duplicates in 1,000 UUIDs (198.1ms) [L#29]
  * test sequential uuids are sequential (59.6ms) [L#50]
  * test utc_random uuids are roughly random (44.5ms) [L#64]
  * test Bad Request error when exceeding max UUID count (10.3ms) [L#42]
  * test cache busting headers are set (9.5ms) [L#9]
  * test utc_id uuids are correct [L#85]warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: negative steps are not supported in String.slice/2, pass 14..-1//1 instead
  (elixir 1.17.3) lib/string.ex:2404: String.slice/2
  test/elixir/test/uuids_test.exs:91: anonymous fn/2 in UUIDsTest."test utc_id uuids are correct"/1
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/2-lists^foldl/2-1-"/3
  test/elixir/test/uuids_test.exs:89: UUIDsTest."test utc_id uuids are correct"/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
  (stdlib 4.3.1.5) timer.erl:235: :timer.tc/1
  (ex_unit 1.17.3) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

  * test utc_id uuids are correct (43.0ms) [L#85]
  * test can return single uuid (27.5ms) [L#17]
  * test Method Not Allowed error on POST (9.5ms) [L#37]

Steps to Reproduce

make elixir tests=test/elixir/test/uuids_test.exs

Expected Behaviour

Should run without warnings.

Your Environment

  • CouchDB version: main
  • Elixir version used: 1.17.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant