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

scala tests like test("...") not recognized most of the time #6809

Open
kostaskougios opened this issue Sep 29, 2024 · 4 comments
Open

scala tests like test("...") not recognized most of the time #6809

kostaskougios opened this issue Sep 29, 2024 · 4 comments

Comments

@kostaskougios
Copy link

Describe the bug

Most of the time scala tests are not recognised (I am using vscode). I can still run a test class but each test is not reported, instead the error for every test is reported at the class level.

i would expect to see the green circle near the test like below:
image

But most of the time I don't see it. clean-build, re-import, restart of the IDE most of the time doesn't help but some times it does.

The tests are randomly recognised at later times.

Note: the code compiles correctly when the issue occurs.

Expected behavior

The tests to be recognised as per below:

image

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.39.6 (pre-release)

Extra context or search terms

scalatest

@kostaskougios
Copy link
Author

Note I don't see anything strange in .metals/bsp.trace.json when the issue occurs

@Ravenow
Copy link

Ravenow commented Oct 14, 2024

I can confirm here, vscode-1.94.2, metals-v1.39.0. only test classes are visible in test explorer and its impossible to run single test-case. Tests implemented with scalatest

изображение
and here is idea for comparision
изображение

@tgodzik
Copy link
Contributor

tgodzik commented Oct 30, 2024

I think another thing we might want to use is the presentation compiler for finding tests cases, which should be much more error proof

@kostaskougios
Copy link
Author

kostaskougios commented Oct 30, 2024

Btw the issue is not limited only to test cases. @main def myMain() method recognition is on and off a lot of the time. (for code that compiles fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

3 participants