Skip to content

Update the Elixir requirement to ~> 1.12 - #164

Open
dajiaohuang wants to merge 1 commit into
riverrun:masterfrom
dajiaohuang:fix/163-elixir-requirement
Open

dajiaohuang wants to merge 1 commit into
riverrun:masterfrom
dajiaohuang:fix/163-elixir-requirement

Conversation

@dajiaohuang

Copy link
Copy Markdown

lib/comeonin/behaviour_test_helper.ex uses stepped ranges (first..last//1), which were introduced in Elixir 1.12, so ~> 1.7 cannot compile on 1.7 - 1.11. This makes Mix report the mismatch instead of failing later with undefined function //0.

Checked at v5.5.1 plus this change: 1.11.4 gives the requirement error; 1.12.3, 1.13.4, 1.14.5, 1.15.8, 1.16.3, 1.17.3, 1.18.4 and 1.20.4 compile, and mix test (10 tests, 0 failures) and mix format --check-formatted pass on each.

The alternative is to rewrite slices/1 so that it also compiles on Elixir 1.11 and earlier; I have not done that.

Fixes #163

lib/comeonin/behaviour_test_helper.ex uses stepped ranges, which were
introduced in Elixir 1.12.
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.

[BUG] Elixir requirement (~> 1.7) does not match the versions the code compiles on

1 participant