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

Improve the message when commands are run and extension not yet activated #369

Open
strowk opened this issue Jul 15, 2020 · 8 comments
Open
Labels
UX Usability improvement

Comments

@strowk
Copy link

strowk commented Jul 15, 2020

Describe the bug

Import of maven project does not work
To Reproduce
Steps to reproduce the behavior:

  1. Open project with pom.xml
  2. Run command 'Metals: Import build'
  3. Error is displayed:
Command 'Metals: Import build' resulted in an error (command 'metals.build-import' not found)

Expected behavior

No errors

Screenshots

Installation:

  • Operating system: Windows
  • Editor: Visual Studio Code
  • Metals version: v1.9.1

Additional context
It's first time I'm running that extension in VSCode

Search terms

@tgodzik
Copy link
Contributor

tgodzik commented Jul 15, 2020

Thanks for reporting. That usually means that the plugin was not yet activated. It should activate once you open a Scala file or a workspace with a standard Scala directory structure.

@tgodzik
Copy link
Contributor

tgodzik commented Jul 15, 2020

Did you manage to activate the extension? I see that you opened another issue, where you progressed further.

@strowk
Copy link
Author

strowk commented Jul 16, 2020

Even after I progressed further, that error sometimes happens. I think that it may be happening only short time after start of vscode

@tgodzik
Copy link
Contributor

tgodzik commented Jul 16, 2020

That's an expected behaviour, because most commands are only available after the language server is fully started. And it can take some seconds to start it up properly.

@strowk
Copy link
Author

strowk commented Jul 16, 2020

Could it then give more convenient message? Something like "Wait for Metals language server to start"?

It's quite more time than seconds, by the way, I think a few minutes at least, but probably because my machine is not very fast

@tgodzik
Copy link
Contributor

tgodzik commented Jul 17, 2020

Could it then give more convenient message? Something like "Wait for Metals language server to start"?

It's quite more time than seconds, by the way, I think a few minutes at least, but probably because my machine is not very fast

That should not be minutes ever, it means that starting a single java process is taking minutes on your machine, which makes it almost unusable 🤔

I have never really seen a situation like that, is there anything in the logs? Is there are message in the bottom saying "Starting Metals server" ?

@strowk
Copy link
Author

strowk commented Jul 28, 2020

Ah, sorry for late response. It starts so slowly, because we have mcafee here and it takes really long time to inspect every process that's being run when vscode starts (which's a bunch of language servers), that's why metals starts some time after vscode already started.
Yes, there's a message at the bottom and I also see how antivirus eats cpu :)

It's not so unusable, once all executables are inspected, it runs as normal, but in between some of the extensions behave erratically, including metals

@tgodzik
Copy link
Contributor

tgodzik commented Jul 28, 2020

Thanks for the explanation. This can be improved inside the VS Code plugin - I will move it here. The issue has a lower priority though, so we would be happy to accept any contributions since I don't think we will be able to work on it soon.

@tgodzik tgodzik transferred this issue from scalameta/metals Jul 28, 2020
@tgodzik tgodzik added the UX Usability improvement label Jul 28, 2020
@tgodzik tgodzik changed the title command 'metals.build-import' not found Improve the message when commands are run and extension not yet activated Jul 28, 2020
kasiaMarek pushed a commit to kasiaMarek/metals-vscode that referenced this issue Mar 29, 2023
…rn/types/node-16.11.7

Bump @types/node from 16.11.6 to 16.11.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX Usability improvement
Projects
None yet
Development

No branches or pull requests

2 participants