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

Missing hex in bundled elixir (bad MIX_HOME?) #460

Closed
teamon opened this issue May 9, 2024 · 4 comments · Fixed by #461 or #462
Closed

Missing hex in bundled elixir (bad MIX_HOME?) #460

teamon opened this issue May 9, 2024 · 4 comments · Fixed by #461 or #462

Comments

@teamon
Copy link

teamon commented May 9, 2024

Fresh install, inside zed.

Settings

{
  "theme": "One Dark",
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },
  "base_keymap": "Atom",
  "buffer_font_size": 12,
  "buffer_font_family": "Menlo",

  "languages": {
    "Elixir": {
      "show_whitespaces": "selection",
      "language_servers": ["next-ls"]
    }
  },

  "lsp": {
    "next-ls": {
      "initialization_options": {
        "extensions": {
          // example configuring the extensions
          "credo": { "enable": false }
        },
        "experimental": {
          // example configuring the experimental options
          "completions": { "enable": true }
        }
      }
    }
  }
}

Log

[Next LS] NextLS v0.21.3 has initialized!
[Next LS] [extension] Credo disabled
[Next LS] Booting runtimes...
[Next LS] Beginning DB migration...
[Next LS] Database is being upgraded from version 0 to 7.

This will trigger a full recompilation in order to re-index your codebase.
[Next LS] Finished DB migration...
[Next LS] Booting runtime for .

- elixir: /Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin/elixir
- zombie wrapper script: /Users/teamon/Library/Application Support/.burrito/next_ls_erts-14.2.1_0.21.3/lib/next_ls-0.21.3/priv/cmd
- working_dir: /Users/teamon/code/headless
- command: /Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin/elixir --no-halt --sname nextls-runtime-1715277021668866333 --cookie 67AWQX3FMND6332NLVYJWQNA5M2SH5TQHV6JNV2ORQ255KZUIKEQ==== -S mix loadpaths --no-compile

Environment: 

LSP=nextls
NEXTLS_PARENT_PID=g1h3Km5leHQtbHMtMTcxNTI3NzAyMTU0MjYzMTIwOEBNYWNCb29rLVByby1CRgAAAQcAAAAAZj0M3g==
MIX_ENV=dev
MIX_TARGET=host
MIX_BUILD_ROOT=.elixir-tools/_build
MIX_HOME=
ROOTDIR=false
BINDIR=false
RELEASE_ROOT=false
RELEASE_SYS_CONFIG=false
PATH=/Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin:/Users/teamon/Library/Application Support/.burrito/next_ls_erts-14.2.1_0.21.3/bin:/Users/teamon/bin:/Users/teamon/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/teamon/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/fzf/bin
[Next LS] Mix requires the Hex package manager to fetch dependencies
[Next LS] Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]
[Next LS] ** (Mix) Could not find an SCM for dependency :phoenix_live_view from Headless.MixProject
[Next LS] Runtime for folder  failed to initialize
[Next LS] The runtime for  has successfully shut down.

I read some other issues and that empty MIX_HOME= looks suspicious.
I've tried deleting ~/.cache/elixir-tools and .elixir-tools but it didn't help.

@teamon teamon changed the title Missing hex in bundled elixir Missing hex in bundled elixir (bad MIX_HOME?) May 9, 2024
@teamon
Copy link
Author

teamon commented May 9, 2024

Same thing happens in VScode ``` [Next LS] NextLS v0.21.3 has initialized! [Info - 19:58:22] [Next LS] [extension] Credo initializing with options %NextLS.InitOpts.Extensions.Credo{enable: true, cli_options: []} [Next LS] Booting runtimes... [Info - 19:58:22] [Next LS] Beginning DB migration... [Info - 19:58:22] [Next LS] Database is on the latest version: 7 [Info - 19:58:22] [Next LS] Finished DB migration... [Info - 19:58:22] [Next LS] Booting runtime for headless.
  • elixir: /Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin/elixir
  • zombie wrapper script: /Users/teamon/Library/Application Support/.burrito/next_ls_erts-14.2.1_0.21.3/lib/next_ls-0.21.3/priv/cmd
  • working_dir: /Users/teamon/code/headless
  • command: /Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin/elixir --no-halt --sname nextls-runtime-1715277502415813625 --cookie 67AWQX3FMND6332NLVYJWQNA5M2SH5TQHV6JNV2ORQ255KZUIKEQ==== -S mix loadpaths --no-compile

Environment:

LSP=nextls
NEXTLS_PARENT_PID=g1h3Km5leHQtbHMtMTcxNTI3NzUwMjIxNjc3MDIwOEBNYWNCb29rLVByby1CRgAAAQkAAAAAZj0Ovw==
MIX_ENV=dev
MIX_TARGET=host
MIX_BUILD_ROOT=.elixir-tools/_build
MIX_HOME=
ROOTDIR=false
BINDIR=false
RELEASE_ROOT=false
RELEASE_SYS_CONFIG=false
PATH=/Users/teamon/.cache/elixir-tools/nextls/elixir/1-17-1/bin:/Users/teamon/Library/Application Support/.burrito/next_ls_erts-14.2.1_0.21.3/bin:/Users/teamon/bin:/Users/teamon/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/opt/homebrew/opt/fzf/bin
[Info - 19:58:22] [Next LS] Mix requires the Hex package manager to fetch dependencies
[Info - 19:58:22] [Next LS] Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]
[Info - 19:58:22] [Next LS] ** (Mix) Could not find an SCM for dependency :phoenix_live_view from Headless.MixProject
[Error - 19:58:22] [Next LS] Runtime for folder headless failed to initialize
[Info - 19:58:22] [Next LS] The runtime for headless has successfully shut down.

</details>

@mhanberg
Copy link
Collaborator

mhanberg commented May 9, 2024

I think I know what it is, thanks for the report!

@mhanberg
Copy link
Collaborator

mhanberg commented May 9, 2024

the issue will close when the linked PR merges and i'll publish a new release, but we can re-open if it doesn't actually fix it.

@teamon
Copy link
Author

teamon commented May 10, 2024

It works now, thanks!

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