-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix: elixir 17 & 18 compatibility #565
fix: elixir 17 & 18 compatibility #565
Conversation
02de2f6
to
814939e
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
{:ok, count, fun} when is_function(fun, 1) -> | ||
slice_list(fun.(enumerable), random_count(count), 1, 1) | ||
|
||
# TODO: Deprecate me in Elixir v1.18. |
Check warning
Code scanning / Credo
Found a TODO tag in a comment: # TODO: Deprecate me in Elixir v1.18. Warning test
71990e5
to
d3838ec
Compare
d3838ec
to
87c8420
Compare
af2c3a5
to
ed0813e
Compare
Thanks. Will there be a release to hex? |
## [0.19.0-alpha.1](v0.18.0...v0.19.0-alpha.1) (2025-01-31) ### Features * add release automation ([#581](#581)) ([0d08ed2](0d08ed2)) ### Bug Fixes * **deps:** add missing @semantic-release/exec ([#584](#584)) ([bfea5c4](bfea5c4)) * **ci:** add workflow_call ([#586](#586)) ([c25f43e](c25f43e)) * **ci:** allow write ([#590](#590)) ([d49419a](d49419a)) * elixir 17 & 18 compatibility ([#565](#565)) ([f3d4808](f3d4808)) * elixir deprecations ([#571](#571)) ([b7e4af0](b7e4af0)) * **ci:** permissions ([#591](#591)) ([d78c8f1](d78c8f1)) * remove nil option for Airports IATA ([#492](#492)) ([59951ec](59951ec)) * **ci:** typo in workflow path ([#585](#585)) ([8ed49eb](8ed49eb))
This PR replaces usages of Elixir functions that return random data, allowing us to update the test to work on all supported Elixir versions:
Enum.random
with:rand.uniform
onFaker.Random.Test.random_between
Enum.random
withrandom_between
onFaker.Random.Test.random_bytes
Enum.take_random
andEnum.shuffle
withEnum.sort_by(random_uniform)
After this changes the only tests breaking was on
Faker.File
because of the map ordering changes on OTP 26, also fixed it and updated CI to test on both OTP 26 and 27.I've added: