Skip to content

Fix warnings#33

Open
greetingsfellowhumans wants to merge 4 commits into
folz:masterfrom
greetingsfellowhumans:fix_warnings
Open

Fix warnings#33
greetingsfellowhumans wants to merge 4 commits into
folz:masterfrom
greetingsfellowhumans:fix_warnings

Conversation

@greetingsfellowhumans

Copy link
Copy Markdown
Contributor

Fixing some compiler warnings.

  1. Mix.Config is deprecated. But the config file was empty, so rather than switching it to import Config, I just removed the config file entirely.
  2. Enum.slice complains about negative ranges without specifiying the step. Added the step.
  3. Removed two tests because new (v1.20+) versions of elixir contain a typechecker that throws a warning about them (you can't call mod_inv/1 with a float). Incidentally, that seems to be the whole purpose of the test in the first place; to prove that passing the wrong type will raise an error. So I believe the new typechecker should actually replace such tests in the future. The function already contains guards to ensure this in older versions.

@folz

folz commented Jul 3, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4acfbb4c1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/math.ex
control_points
|> Enum.with_index()
|> Enum.slice(0..-2)
|> Enum.slice(0..-2//1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep slice syntax compatible with supported Elixir

This package still declares elixir: "~> 1.4" in mix.exs, and .travis.yml explicitly tests Elixir 1.4.5 through 1.9.4, but the new stepped-range syntax (..//) was added in later Elixir releases. As a result, users and CI jobs on the declared supported versions cannot even parse this file, so fixing the warning for newer Elixir versions currently breaks older supported environments.

Useful? React with 👍 / 👎.

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.

2 participants