feat: bump luerl to 1.5.0 (#86)
This bumps the luerl dependency to 1.5.0 and makes tests pass again.
Failing tests were either due to:
- unicode Handling (this PR basically reverses 598e0ae because it seems now handled correctly by luerl)
- changed error messages
The changelog mentions other things as well, but I'm not sure if these influence this library or not.
closes #86
Thank you for the PR! Running the tests now
I think there might have been some problem with builds.hex.pm right when running the builds. Should they be retried?
There seem to be a dialyzer check that's not passing. It's related to lib/lua.ex:288:
defp illegal_index([:_G | keys]), do: illegal_index(keys)
defp illegal_index(["_G" | keys]), do: illegal_index(keys)
defp illegal_index(keys) do
{:illegal_index, nil, Enum.join(keys, ".")}
end
It seems that :_G cannot match anymore:
lib/lua.ex:288:8:pattern_match
The pattern can never match the type.
Pattern:
[:_G | _keys]
Type:
[
false
| nil
| true
| binary()
| number()
| {:eref, _}
| {:erl_func, _}
| {:tref, _}
| {:usdref, _}
| {:funref, _, _}
| {:erl_mfa, _, _, _}
]
Do you think it is safe to just remove the line 288?
Looking at it once more, it seems that just removing 288 won't be enough, since Enum.join will not work with tuples.
What about something like this?
defp illegal_index(["_G" | keys]), do: illegal_index(keys)
defp illegal_index(keys) do
{:illegal_index, nil,
keys
|> Enum.map(fn key ->
if(is_tuple(key)) do
inspect(key)
else
key
end
end)
|> Enum.join(".")}
end
@davydog187 what are the chances of this getting merged? Mostly looking at the UTF-8 changes this PR addresses :)
I'll get this pushed through this week. Apologies for the delay, we're on the other side of a big launch and just getting back to OSS
hello @bu6n sorry for the delay on reviewing this. It still seems like something is off, given the changes to the tests.
I can take a look if you'd like
Ok so there seems to be a regression in Luerl itself, I'll send a patch to Luerl
For reference:
{1, :luerl_scan, {:user, ~c"syntax error near '<\\34>'"}}
PR sent upstream to Luerl https://github.com/rvirding/luerl/pull/221
thank you!