-
Notifications
You must be signed in to change notification settings - Fork 39
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 warnings for Elixir 1.16 and update Elixir version requirement #58
Conversation
The order should not matter and is also on a deprecated function.
assert doc(:person, %{occupation: "Developer", city: "Montreal"}) == | ||
~s|<?xml version="1.0" encoding="UTF-8"?>\n<person city="Montreal" occupation="Developer"/>| | ||
assert doc(:person, %{occupation: "Developer", city: "Montreal"}) in [ | ||
~s|<?xml version="1.0" encoding="UTF-8"?>\n<person city="Montreal" occupation="Developer"/>|, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of these attributes changes between Elixir v1.14 and v1.15, but don't believe it has a significant impact.
otp: ['22.3'] | ||
elixir: ['1.11.2', '1.10.4', '1.9.4', '1.8.2', '1.7.4', '1.6.6'] | ||
otp: [24.x, 25.x, 26.x] | ||
elixir: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to stop testing OTP 22.x, Elixir 1.6 - 1.11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any harm to include older version if it does not impede future supported versions. Elixir 1.11 is not "supported" anymore: https://hexdocs.pm/elixir/1.16.2/compatibility-and-deprecations.html
Since upgrading Elixir should be very simple, it should be acceptable for new libraries releases to only support from 1.12.x.
I will add Elixir 1.11 to see if it passes the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding 1.11 gives the following compilation errors:
== Compilation error in file lib/nimble_parsec/compiler.ex ==
Error: ** (CompileError) lib/nimble_parsec/compiler.ex:931: cannot find or invoke local _/1 inside match. Only macros can be invoked in a match and they must be defined before their invocation. Called as: _(/ / _ = range)
could not compile dependency :nimble_parsec, "mix compile" failed. You can recompile this dependency with "mix deps.compile nimble_parsec", update it with "mix deps.update nimble_parsec" or clean it with "mix deps.clean nimble_parsec"
(stdlib 3.17.2.4) lists.erl:1358: :lists.mapfoldl/3
(stdlib 3.17.2.4) lists.erl:1359: :lists.mapfoldl/3
(stdlib 3.17.2.4) lists.erl:1358: :lists.mapfoldl/3
(stdlib 3.17.2.4) lists.erl:1359: :lists.mapfoldl/3
(elixir 1.11.4) expanding macro: Kernel.".."/2
lib/nimble_parsec/compiler.ex:931: NimbleParsec.Compiler.newline_allowed?/1
so think it is better to set the minimum to elixir 1.12. wdyt?
Thanks @wkirschbaum! Looks good, I left a small comment, but otherwise good to go. Do you know why order of attributes in |
@joshnuss I am not entirely sure, but according to the Map documentation: So either it has to be manually ordered after retrieval or we need to accept ordering won't be predictable. Regarding, the 1.12 constraint on Elixir: it is because of a failure of the latest version of the nimble_parsec library, but also because Elixir 1.11 is not "supported" anymore, so probably not worth supporting it in this library anymore. |
Thanks @wkirschbaum OK, sounds good, let's set 1.12 as the minimum.
My only concern is that downstream, people will have unit tests making the same assumption, and they will break. But the alternative is sorting, which will hurt perf |
Its already a problem. Nothing in the PR changes the behaviour, we are just testing more versions to expose these kinds of issues. |
Thanks @wkirschbaum!! |
No description provided.