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

New tests not detected #1997

Open
nojaf opened this issue Mar 30, 2024 · 2 comments · May be fixed by #2000
Open

New tests not detected #1997

nojaf opened this issue Mar 30, 2024 · 2 comments · May be fixed by #2000

Comments

@nojaf
Copy link
Contributor

nojaf commented Mar 30, 2024

Describe the bug

When adding a new unit test in an existing file, the new test does not get picked up.

Steps to reproduce

  • Try cloning https://github.com/fsprojects/fantomas
  • Open project and file src\Fantomas.Core.Tests\Stroustrup\SynBindingFunctionExpressionTests.fs
  • Wait until you can see test icon for existing tests
  • add a new test like [<Test>] let foo () = ()

Expected behaviour

The new test gets picked up.

Screenshots

image

Machine info

  • OS: Windows
  • .NET SDK version: 8.0.202
  • Ionide version: v7.18.2

Additional context

I noticed @farlee2121 changed the way unit tests are detected in #1874. There no longer seems to be any notification coming from the LSP server.

Is the file being watched for changes? I can't really find any evidence for this in the current code.

@farlee2121
Copy link
Contributor

It still uses the same LSP code analysis notifications for live updates as before.
It now routes through a mailbox to resolve concurrency issues .
The main handler is onTestsDiscoveredInCode

@nojaf
Copy link
Contributor Author

nojaf commented Apr 2, 2024

Hmm, when attaching to FSAC, I see that I get an exception from:

image

image

The test is found but I suspect the notification is not getting to the client.

@baronfel, shot in the dark: is FSharpSignatureData trying to resolve a symbol with cached checking information? As it is failing for newly typed code that would be my guess.

@nojaf nojaf linked a pull request Apr 5, 2024 that will close this issue
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 a pull request may close this issue.

2 participants