elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.34k stars 3.36k forks source link

Build/package/check for v1.11.1 fails on Alpine (several archs) #10464

Closed schrodervictor closed 3 years ago

schrodervictor commented 3 years ago

Hello dear maintainers,

Alpine Linux contributor here, trying to push Elixir v1.11.1 to the aports. Everything works beautifully locally starting from a fresh Alpine Linux 3.12 (x86_64 arch), but the builds fail on CI for this and every other arch, except for s390x.

The error is the following:

...
==> elixir (eunit)
   All 191 tests passed.
 ==> elixir (ex_unit)
 == Compilation error in file test/elixir/module/types/types_test.exs ==
 ** (UndefinedFunctionError) function TypeHelper.expand_expr/4 is undefined or private. Did you mean one of:
       * expand_expr/4
     TypeHelper.expand_expr([], [], {{:., [line: 1], [{:__aliases__, [counter: {Module.Types.TypesTest, 62}, line: 1], [:URI]}, :unknown]}, [line: 1], ["foo"]}, #Macro.Env<aliases: [{Types, Module.Types}, {Pattern, Module.Types.Pattern}, {Expr, Module.Types.Expr}], context: nil, context_modules: [Module.Types.TypesTest], file: "/builds/schrodervictor/aports/community/elixir/src/elixir-1.11.1/lib/elixir/test/elixir/module/types/types_test.exs", function: {:"test undefined function warnings", 1}, functions: [{ExUnit.Assertions, [assert: 2, assert_in_delta: 3, assert_in_delta: 4, ...]}, {ExUnit.Callbacks, [on_exit: 1, on_exit: 2, ...]}, {Kernel, [!=: 2, ...]}], lexical_tracker: #PID<0.353.0>, line: 82, macro_aliases: [], macros: [{ExUnit.DocTest, ...}, {...}, ...], module: Module.Types.TypesTest, requires: [...], ...>)
     (stdlib 3.13.2) erl_eval.erl:680: :erl_eval.do_apply/6
     (stdlib 3.13.2) erl_eval.erl:449: :erl_eval.expr/5
     (stdlib 3.13.2) erl_eval.erl:126: :erl_eval.exprs/5
     expanding macro: Module.Types.TypesTest.warning/2
     test/elixir/module/types/types_test.exs:82: Module.Types.TypesTest."test undefined function warnings"/1
     (ex_unit 1.11.1) expanding macro: ExUnit.Assertions.assert/1
     test/elixir/module/types/types_test.exs:82: Module.Types.TypesTest."test undefined function warnings"/1
 make: *** [Makefile:285: test_stdlib] Error 1

The initiator commands for this step of the build are simply:

# build()
$ LANG="en_US.UTF-8" make

# package()
$ make DESTDIR="$pkgdir" PREFIX=/usr install

# check()
$ make test

The complete log and all other failed jobs can be found at the open Merge Request, on Alpine Linux's GitLab repo: https://gitlab.alpinelinux.org/schrodervictor/aports/-/jobs/236742

Are you aware of any problem related to TypeHelper.expand_expr/4? Any hint to track this down is very welcome.

josevalim commented 3 years ago

Thanks, it was a race when loading our tests. No bug in the code, only in the test files. I will release v1.11.2 tomorrow since we have some fixes pending.