Skip to content

mix's GenServer :get_stack call failing on main branch #12574

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

Closed
viniciusmuller opened this issue May 18, 2023 · 3 comments
Closed

mix's GenServer :get_stack call failing on main branch #12574

viniciusmuller opened this issue May 18, 2023 · 3 comments

Comments

@viniciusmuller
Copy link
Contributor

Elixir and Erlang/OTP versions

Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:32:16] [ds:32:16:10] [async-threads:1] [jit:ns]

Elixir 1.14.4 (compiled with Erlang/OTP 25)

Operating system

Linux nixos 6.1.24 #1-NixOS SMP PREEMPT_DYNAMIC Thu Apr 13 14:55:40 UTC 2023 x86_64 GNU/Linux

Current behavior

When checking out the main branch and trying to run the mix tool, I'm getting the following error:

** (exit) exited in: GenServer.call(Mix.ProjectStack, {:get_stack, #Function<13.127266841/1 in Mix.ProjectStack.peek/0>}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.14.4) lib/gen_server.ex:1027: GenServer.call/3
    lib/mix/project.ex:188: Mix.Project.get/0
    lib/mix/cli.ex:64: Mix.CLI.get_task/1
    lib/mix/cli.ex:30: Mix.CLI.proceed/1

The other tools are working fine

Expected behavior

Running from the main branch, mix should not crash.

I'm still not used to compiling and running custom version of the tooling, so maybe the error is on my end.

@josevalim
Copy link
Member

I cannot reproduce this. Here is what I do:

  1. make clean test
  2. Then I can go to any project and run mix test with no problems

Can you please provide more information on how you get this exception? which commands are you running? where?

@viniciusmuller
Copy link
Contributor Author

When running make clean test it works and all tests pass.

The problem I'm having is with using the mix program from inside the bin directory in the repository.
I couldn't find any documentation on how to build something such as mix and where it is stored after it.

I get the error simply by trying to run the mix binary inside the bin folder

vini@nixos:~/projects/elixir/elixir(main)$ ./bin/elixir -v
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:32:16] [ds:32:16:10] [async-threads:1] [jit:ns]

Elixir 1.15.0-dev (684130d) (compiled with Erlang/OTP 25)
vini@nixos:~/projects/elixir/elixir(main)$ ./bin/mix -v
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:32:16] [ds:32:16:10] [async-threads:1] [jit:ns]

Mix 1.14.4 (compiled with Erlang/OTP 25)
vini@nixos:~/projects/elixir/elixir(main)$ ./bin/mix help
** (exit) exited in: GenServer.call(Mix.ProjectStack, {:get_stack, #Function<13.127266841/1 in Mix.ProjectStack.peek/0>}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.14.4) lib/gen_server.ex:1027: GenServer.call/3
    lib/mix/project.ex:235: Mix.Project.config/0
    lib/mix/cli.ex:123: Mix.CLI.maybe_change_env_and_target/1
    lib/mix/cli.ex:32: Mix.CLI.proceed/1

But I'm not sure this is the correct way of doing things

@josevalim
Copy link
Member

Mix is an Elixir script and it will use whatever Elixir is in your path. You can see it even reports different version. You just add bin to your $PATH and then all should be good!

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

No branches or pull requests

2 participants