Skip to content

ElixirLS initialize request times out in CI #145

@LakshyAAAgrawal

Description

@LakshyAAAgrawal

Root cause

ElixirLS v0.30.0 is not a pre-built binary. The downloaded zip contains only launch scripts and an installer.exs. On first launch, language_server.sh runs:

echo "" | elixir "$SCRIPTPATH/quiet_install.exs" >/dev/null || exit 1

This triggers Mix.install which:

  1. Downloads ElixirLS source from GitHub
  2. Fetches all Hex dependencies (elixir_sense, dialyxir, jason, etc.)
  3. Compiles everything

This blocking build takes several minutes and runs before the LSP server starts. The initialize request sits in the stdin pipe unread until the build completes.

Why CI times out

Each test creates a new ElixirLS server instance. Even though the server binary is shared, Mix.install runs inside each subprocess. If the Mix.install cache (~/.cache/mix/installs/) is not shared across instances, each test pays the full build cost: 8 async + 8 sync tests × 600s timeout = 160+ minutes.

Possible fixes

  1. Pre-warm the ElixirLS build in a CI setup step before running tests (run language_server.sh once and let it build, then kill it)
  2. Share a single ElixirLS instance across all Elixir tests (test fixture refactor)
  3. Use an older ElixirLS release (<= v0.22) that shipped pre-built .ez archives
  4. Cache ~/.cache/mix/installs/ in CI so subsequent runs are fast

Tests are currently skipped in CI with a reference to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions