Skip to content
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

Not matching clause {:m_generate, ... during mix tria.warmup #10

Open
mat-hek opened this issue Aug 18, 2023 · 4 comments
Open

Not matching clause {:m_generate, ... during mix tria.warmup #10

mat-hek opened this issue Aug 18, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mat-hek
Copy link

mat-hek commented Aug 18, 2023

Hello again 👋 trying to compile membrane with tria again and running into some issues. After some tweaking, I managed to compile membrane_core (I'll dig deeper and report issues later on), but I stuck on an error during mix tria.warmup --available:

830/2447 MapSet 8/21** (CaseClauseError) no case clause matching: {:m_generate, {471, 33}, {:map_field_exact, {471, 28}, {:var, {471, 26}, :K}, {:var, {471, 31}, :_}}, {:var, {471, 36}, :D}}
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:72: Tria.Compiler.AbstractTranslator.traverse/1
    (elixir 1.15.4) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:75: Tria.Compiler.AbstractTranslator.traverse/1
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:115: Tria.Compiler.AbstractTranslator.traverse/1
    (elixir 1.15.4) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:75: Tria.Compiler.AbstractTranslator.traverse/1
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:294: Tria.Compiler.AbstractTranslator.traverse/1
    (tria 0.0.1) lib/tria/compiler/translator/abstract.ex:324: Tria.Compiler.AbstractTranslator.traverse/1

To reproduce:

git clone [email protected]:membraneframework/membrane_core.git -b try-tria
cd membrane_core
mix deps.get
mix compile && mix tria.warmup --available

I'd appreciate your help. Also, maybe it would be possible to add a catch and reraise somewhere that would print the original stacktrace/code that was being analyzed/translated when the error happened? Having that, it would be easier for me to debug myself.

Regards,
Mateusz

@hissssst
Copy link
Owner

Hi, thanks for a bug report, I'll take a look at this during the weekend

@hissssst
Copy link
Owner

@mat-hek it appears that Tria fails to analyze MapSet module. What exact versions of Elixir and OTP are you using?

@mat-hek
Copy link
Author

mat-hek commented Aug 21, 2023

$ elixir -v
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.15.4 (compiled with Erlang/OTP 24)

@mat-hek
Copy link
Author

mat-hek commented Aug 21, 2023

I also tried on Elixir 1.14.3 / OTP 25 and got this instead:

1020/2444 Record.Extractor 2/13** (CaseClauseError) no case clause matching: {:mc, {58, 13}, {:map_field_assoc, {58, 28}, {:tuple, {58, 15}, [{:var, {58, 16}, :Name}, {:var, {58, 21}, :Arity}]}, {:atom, {58, 31}, :local}}, [{:generate, {58, 66}, {:tuple, {58, 40}, [{:atom, {58, 41}, :function}, {:var, {58, 50}, :_}, {:var, {58, 52}, :Name}, {:var, {58, 57}, :Arity}, {:var, {58, 63}, :_}]}, {:var, {58, 69}, :Forms}}]}
    lib/tria/compiler/translator/abstract.ex:72: Tria.Compiler.AbstractTranslator.traverse/1
    lib/tria/compiler/translator/abstract.ex:122: Tria.Compiler.AbstractTranslator.traverse/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    lib/tria/compiler/translator/abstract.ex:75: Tria.Compiler.AbstractTranslator.traverse/1
    lib/tria/compiler/translator/abstract.ex:444: Tria.Compiler.AbstractTranslator.traverse_block/1
    lib/tria/compiler/translator/abstract.ex:316: Tria.Compiler.AbstractTranslator.traverse/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    lib/tria/compiler/translator/abstract.ex:75: Tria.Compiler.AbstractTranslator.traverse/1

@hissssst hissssst added the bug Something isn't working label Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants