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

Run tests without Scala Debug Adapter #392

Open
tgodzik opened this issue Jul 11, 2024 · 5 comments
Open

Run tests without Scala Debug Adapter #392

tgodzik opened this issue Jul 11, 2024 · 5 comments
Labels

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Jul 11, 2024

Is your feature request related to a problem? Please describe.

It seems that even when running test without debug on it takes a large amount of time to start the tests. This could be quicker and DAP is not neccessary here.

Describe the solution you'd like

Use the approach that we had for Native (or similar) to fake a DAP server instead of running via DAP.

We could even do that for Bloop also.

Describe alternatives you've considered

Using the current mechanism

Additional context

No response

Search terms

debug test run

@tgodzik tgodzik added the debug label Jul 11, 2024
@adpi2
Copy link
Member

adpi2 commented Jul 11, 2024

It seems that even when running test without debug on it takes a large amount of time to start the tests. This could be quicker and DAP is not neccessary here.

It is true that DAP is not necessary here, but do we know what's taking time here? Because maybe it is just the compilation and that's not a step we can skip.

I tested on the Scala 3 compiler repo: it takes about 50 seconds to compile the first time but then starting the tests takes less than 1s

@tgodzik
Copy link
Contributor Author

tgodzik commented Jul 11, 2024

For running main the difference is noticable, but maybe it's not really a big issue 🤔

mill-scala-hello-1720703366973.mp4

When testing simple project it seems a bit slower that it should though:

mill-scala-hello-1720703479746.mp4

Maybe this not a huge win to run under plain java, but on the other hand we don't need any DAP related stuff when debug is disabled and for sure it add something to the execution time.

Overall, not a big issue probably

@adpi2
Copy link
Member

adpi2 commented Jul 31, 2024

It would be useful to trace the BSP and DAP sequence to see what is so slow.

@adpi2
Copy link
Member

adpi2 commented Aug 6, 2024

It would be useful to trace the BSP and DAP sequence to see what is so slow.

The whole process takes about 1-2 seconds on my laptop and I don't have enough precision (seconds) in the traces for it to be meaningful.

However it seems that the debugger is quite fast to start, and I can even see the logs of the debuggee almost immediately, but the test result is appearing some time later in the UI. Could it be that the debugger is slow to stop or that Metals or VSCode are slow to process the test outputs?

@tgodzik
Copy link
Contributor Author

tgodzik commented Aug 6, 2024

Good question, I guess figuring that out would be the first step here. Might be an issue with VS Code setup for DAP 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants