Skip to content

Bump elixir_sense and fix flaky CI tests - #1280

Merged
lukaszsamson merged 1 commit into
masterfrom
sync-elixir-sense-fix-flaky-ci
Oct 18, 2026
Merged

lukaszsamson merged 1 commit into
masterfrom
sync-elixir-sense-fix-flaky-ci

Conversation

@lukaszsamson

Copy link
Copy Markdown
Collaborator

elixir_sense bump

Updates elixir_sense to a15a1f4b, picking up:

Flaky debug adapter tests (seen on Elixir 1.20 / OTP 29)

debugger_test.exs and exunit_formatter_test.exs point the group leader of the global ElixirLS.DebugAdapter.Output process at a PacketCapture started with start_link from the test process. When the test process exits, the capture dies with it, before on_exit restores the group leader. An async request finishing in that window (e.g. a dap_request telemetry event for evaluate / continue) makes Output write to a dead group leader and stop with :terminated:

[error] GenServer ElixirLS.DebugAdapter.Output terminating
** (stop) :terminated
Last message (from #PID<...>): {:send_event, %GenDAP.Events.OutputEvent{... "elixir_ls.dap_command" => "evaluate" ...

Output is not supervised, so every following test fails in setup:

** (ArgumentError) errors were found at the given arguments:
  * 1st argument: not a pid
  :erlang.process_info(nil)
  test/debugger_test.exs:29: ElixirLS.DebugAdapter.ServerTest.__ex_unit_setup_1/1

The fix adds an unlinked PacketCapture.start/1. The tests now use it and stop the capture in on_exit after the group leader is restored.

Order-dependent implementation locator test

find implementations of behaviour module matched the result list positionally, but the order comes from :code.all_loaded/0 and is not deterministic. It failed on master (Elixir 1.20 / OTP 29 / windows). The test now sorts the results before matching.

Update elixir_sense to a15a1f4b, which includes the SurroundContext
`%var.foo{}` hover crash fix (elixir-lsp/elixir_sense#345) and the
Normalized.Typespec corrupt beam fix (elixir-lsp/elixir_sense#346).

Debug adapter tests swapped the group leader of the global
ElixirLS.DebugAdapter.Output process for a PacketCapture linked to the
test process. The capture died with the test process before on_exit
restored the group leader, so an async request finishing in that window
(e.g. a telemetry event for `evaluate`/`continue`) made Output stop with
`:terminated`. Output is not supervised, so every following test failed
in setup with `Process.info(nil)`. Start the capture unlinked and stop it
in on_exit after the group leader is restored.

The "find implementations of behaviour module" test relied on the order
of `:code.all_loaded/0`; sort the results before matching.
@lukaszsamson
lukaszsamson merged commit 8ad8c57 into master Oct 18, 2026
23 checks passed
@lukaszsamson
lukaszsamson deleted the sync-elixir-sense-fix-flaky-ci branch October 18, 2026 21:14
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 this pull request may close these issues.

1 participant