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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Alexander F. Rødseth (xyproto)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

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
Comment by Evangelos Foutras (foutrelis) - Sunday, 14 May 2017, 14:51 GMT
@Alexander: Do you know if other Erlang packages could be affected too?
Comment by Alexander F. Rødseth (xyproto) - Sunday, 14 May 2017, 18:51 GMT
@foutrelis, no, not that I'm aware of. However, it might be safest to rebuild all of them (it's not that many).
Comment by Evangelos Foutras (foutrelis) - Sunday, 14 May 2017, 18:59 GMT
I'll proceed with the rebuilds.

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
Comment by Alexander F. Rødseth (xyproto) - Sunday, 14 May 2017, 19:10 GMT
Suggested new PKGBUILD for elixir: http://ix.io/tIA (elixir --version works)
Comment by PotHix (PotHix) - Sunday, 14 May 2017, 19:23 GMT
I'm using the community repository (not the community-testing) and receiving a rc version of Erlang. Is that right?
BTW, I have the same problem with Elixir, this is the reason I found this bug.
Comment by Evangelos Foutras (foutrelis) - Sunday, 14 May 2017, 19:48 GMT
Found this btw: https://github.com/elixir-lang/elixir/issues/5851

"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

Loading...