elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

Test Lens did not show run test command

Open Fubuchi opened this issue 3 years ago • 2 comments

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.13.3 (compiled with Erlang/OTP 22)
  • Elixir Language Server version: 0.8.2
  • Operating system: Win 10 Pro Version 10.0.19042.1466
  • Editor or IDE name (e.g. Emacs/VSCode):
VSCode 
Version: 1.65.2 (user setup)
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:55.248Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042
  • Editor Plugin/LSP Client name and version: 0.9.0

Current behavior

elixirLS.enableTestLenses was set to true but run test command did not show for test

image

ElixirLS log

Started ElixirLS v0.8.2
Elixir version: "1.13.3 (compiled with Erlang/OTP 22)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.10.4 and erlang 22
MIX_ENV: test
MIX_TARGET: 
[Info  - 12:46:39 PM] Compile took 577 milliseconds
[Info  - 12:46:39 PM] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 12:46:39 PM] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 12:46:39 PM] [ElixirLS Dialyzer] Found 0 changed files in 3 milliseconds
[Info  - 12:46:39 PM] [ElixirLS Dialyzer] Analyzing 0 modules: []
[Info  - 12:46:39 PM] [ElixirLS Dialyzer] Analysis finished in 73 milliseconds
[Info  - 12:46:39 PM] Dialyzer analysis is up to date
[Info  - 12:46:39 PM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 12:46:39 PM] [ElixirLS WorkspaceSymbols] 22 callbacks added to index
[Info  - 12:46:39 PM] [ElixirLS WorkspaceSymbols] 160 modules added to index
[Info  - 12:46:40 PM] [ElixirLS Dialyzer] Writing manifest...
[Info  - 12:46:41 PM] [ElixirLS Dialyzer] Done writing manifest in 1987 milliseconds.
[Info  - 12:46:41 PM] [ElixirLS WorkspaceSymbols] 325 types added to index
[Info  - 12:46:44 PM] [ElixirLS WorkspaceSymbols] 3878 functions added to index

Expected behavior

Run test command should be shown and clickable

Addition information.

I added a bunch of log and it look like the the function is_test_file could not handle the file name in my project.

image

The modified code

image

Fubuchi avatar Mar 29 '22 04:03 Fubuchi

I think there is a path separator mismatch issue:

image

image

Fubuchi avatar Mar 29 '22 05:03 Fubuchi

Nice investigation @Fubuchi. It will be an easy fix

lukaszsamson avatar Mar 29 '22 06:03 lukaszsamson