Skip to content

Conversation

@erikjmiller
Copy link
Contributor

Range.new/2 was deprecated in elixir 1.18. FIST was recently updated to 1.18 and we are now seeing a warning due to that usage. This PR just updates the code to call Range.new/3 instead.

Warning is...

warning: Range.new/2 and first..last default to a step of -1 when last < first. Use Range.new(first, last, -1) or first..last//-1, or pass 1 if that was your intention
  (pdf417 0.2.0) lib/pdf417/error_correction.ex:16: anonymous fn/3 in PDF417.ErrorCorrection.correction_codewords/2
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (pdf417 0.2.0) lib/pdf417/error_correction.ex:12: PDF417.ErrorCorrection.correction_codewords/2
  (pdf417 0.2.0) lib/pdf417/high_level_encoder.ex:40: PDF417.HighLevelEncoder.error_correction/2
  (pdf417 0.2.0) lib/pdf417/high_level_encoder.ex:16: PDF417.HighLevelEncoder.encode/1
  (pdf417 0.2.0) lib/pdf417.ex:23: PDF417.encode/2
  (fist 0.1.0) lib/fist_web/helpers.ex:18: FISTWeb.Helpers.base64_front_barcode_image/1
  (fist 0.1.0) lib/fist_web/live/redeem_ticket_barcodes_live/redeem_ticket_barcodes_live.html.heex:88: anonymous fn/2 in FISTWeb.RedeemTicketBarcodesLive.render/1
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:420: Phoenix.LiveView.Diff.traverse/6
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:419: Phoenix.LiveView.Diff.traverse/6
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:398: Phoenix.LiveView.Diff.traverse/6
  (phoenix_live_view 1.1.16) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3

Copy link
Contributor

@photomattmills photomattmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bump the version too

@erikjmiller erikjmiller merged commit 86a5b63 into main Nov 17, 2025
1 check passed
@erikjmiller erikjmiller deleted the lotc-2294-fix-deprecation-warning-for-1.18 branch November 17, 2025 20:34
erikjmiller added a commit that referenced this pull request Nov 17, 2025
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.

3 participants