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

FunctionClauseError when starting newly cloned elixir-koans #250

Closed
m3co-code opened this issue May 22, 2020 · 4 comments · Fixed by #251
Closed

FunctionClauseError when starting newly cloned elixir-koans #250

m3co-code opened this issue May 22, 2020 · 4 comments · Fixed by #251

Comments

@m3co-code
Copy link

This is my absolute first contact with Elixir: so I have no clue what I'm doing! I freshly installed Erlang and Elixir on Ubuntu, cloned this nice koan project, installed the mix dependencies and started to meditate. But I get an error right away. Here the list of things I have installed. Please let me know if I can provide more information!

$ elixir -v
Erlang/OTP 23 [erts-11.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.10.3 (compiled with Erlang/OTP 21)

$ mix -v
Erlang/OTP 23 [erts-11.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Mix 1.10.3 (compiled with Erlang/OTP 21)

$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  file_system 0.2.2
All dependencies are up to date

$ mix meditate
15:56:28.380 [error] Process #PID<0.459.0> raised an exception
** (FunctionClauseError) no function clause matching in Execute.extract_file_and_line/1
    (elixir_koans 0.0.1) lib/execute.ex:53: Execute.extract_file_and_line(nil)
    (elixir_koans 0.0.1) lib/execute.ex:46: Execute.expand/2
    (elixir_koans 0.0.1) lib/execute.ex:35: Execute.exec/4

Thank you already for your work and the koans!

@m3co-code
Copy link
Author

FTR: I verified whether the PR #242 would resolve the issue, as it looked related, but the result is exactly the same as before.

@rabuf
Copy link

rabuf commented May 27, 2020

A workaround that will let you at least run the koans, though it removes useful information, is to simply add:

defp extract_file_and_line(_), do: {:unknown, :unknown}

after the existing clause. For some reason (I'm new to Elixir so I'm not sure why) after processing the stack trace, the value spent to the extract function is nil. This probably has to do with the way stacktrace has to be called inside of a try/rescue now, but this is as far as I got.

@kknives
Copy link
Contributor

kknives commented Jun 4, 2020

I looked at it and it seems that System.stacktrace has been phased out in Elixir 1.10
So, with #251 the tests pass and a few koans I tried gave me no errors.

@kknives
Copy link
Contributor

kknives commented Jun 4, 2020

It should work now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants