FS#54033 - [elixir] Elixir needs rebuild after erlang update
Attached to Project:
Community Packages
Opened by Robin W (Codesteak) - Saturday, 13 May 2017, 21:28 GMT
Last edited by Evangelos Foutras (foutrelis) - Sunday, 14 May 2017, 19:48 GMT
Opened by Robin W (Codesteak) - Saturday, 13 May 2017, 21:28 GMT
Last edited by Evangelos Foutras (foutrelis) - Sunday, 14 May 2017, 19:48 GMT
|
Details
Description:
It looks like Elixir-1.4.2-1 can't handle command line arguments after updating to erlang-20rc1. It can be fixed with a rebuild. Additional info: * see also https://bbs.archlinux.org/viewtopic.php?id=226164 Steps to reproduce: Run 'elixir --version' after updating erlang to 20rc1. Elixir will crash. |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Sunday, 14 May 2017, 19:48 GMT
Reason for closing: Fixed
Additional comments about closing: elixir 1.4.2-2
Sunday, 14 May 2017, 19:48 GMT
Reason for closing: Fixed
Additional comments about closing: elixir 1.4.2-2
It would certainly be nice to fully understand the issue here, but the error messages aren't too helpful.
iex(1)> Elixir.Version.parse("1.2.3")
:error
iex(2)> Elixir.System.build_info
** (MatchError) no match of right hand side value: :error
(elixir) lib/system.ex:177: System.build/0
(elixir) lib/system.ex:169: System.build_info/0
BTW, I have the same problem with Elixir, this is the reason I found this bug.
"No longer use regexes in Elixir as they are not portable from 19->20"
So I guess it was the regular expressions that necessitate a rebuild.
EDIT: Further explanation about the problem with precompiled regexes can be found in lib/elixir/lib/regex.ex: [1]
====================================================================================
## Precompilation
Regular expressions built with sigil are precompiled and stored in `.beam`
files. This may be a problem if you are precompiling Elixir to run in
different OTP releases, as OTP releases may update the underlying regular
expression engine at any time.
For such reasons, we always recomend precompiling Elixir projects using
the OTP version meant to run in production. In case cross-compilation is
really necessary, you can manually invoke `Regex.recompile/1` or `Regex.
recompile!/1` to perform a runtime version check and recompile the regex
if necessary.
====================================================================================
[1] https://raw.githubusercontent.com/elixir-lang/elixir/master/lib/elixir/lib/regex.ex