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

When no workspace and metals cannot start show error message in a more visible place #1477

Closed
Sporarum opened this issue Mar 27, 2024 · 2 comments · Fixed by #1481
Closed

Comments

@Sporarum
Copy link

Sporarum commented Mar 27, 2024

Describe the bug

When first installing Metals, when going to the Metals tab on the sidebar, the four sections print:
"There is no data provider registered that can provide view data."
(The four sections being: Packages, Build Commands, Ongoing Compilations, Help and Feedback.)

To Reproduce

Exact reproducer:

  1. Connect to vdi.epfl.ch with your epfl credentials
  2. Select VM IC-Windows-Cours1
  3. Open VS Code
  4. Install Metals
  5. Click on the Metals logo on the left, below the extensions icon
  6. The newly opened side pannel contains nothing but the error

Approximate reproducer:

  1. Install VS Code
  2. Go to point 4. above

Expected behavior

It should either:

  1. Work straight away
  2. If the user needs to do something, then clear instructions should be printed

In particular, you'll note the Metals Doctor, and the logs are not accessible, as they would be under "Help and Feedback"

Similar bugs

When opening Metals outside of a Scala Project, the Packages section shows buttons to help getting started, but the remaining sections show the same "no data provider" message.
Again, this includes the "Help and Feedback" section, and so the doctor and the logs.

This is the case only sometimes, trying it again, the buttons appeared for a split second before being replaced by the "no data provider" message.

Screenshots

image

Similar bug with
image

Installation:

  • Operating system: Windows
  • VSCode version: 1.81.1 (system setup)
  • VSCode extension version: Couldn't find where that is ^^'
  • Metals version: 1.2.2
@Sporarum
Copy link
Author

Going to Output -> Metals does reveal the cause of the issue:
"Metals will not start because you've opened a single file and not a project directory."

This message should not be hidden there !

And furthermore, replacing the "no data provider" message by that message would not completely fix the situation, as the "New Scala Project" button, and the "Help and Feedback" section would still not be present.

Therefore I think instead Metals should run in a simplified mode when outside a folder, just enough to enable users to create a project.

@kasiaMarek
Copy link
Contributor

kasiaMarek commented Mar 28, 2024

This message should not be hidden there !

We can show the message in a more visible manner and provide information on should the user do as a temporary solution.

Therefore I think instead Metals should run in a simplified mode when outside a folder, just enough to enable users to create a project.

For those we already have issues:
#357
scalameta/metals-feature-requests#231
and there is some in progress work to allow metals to work without a workspace:
scalameta/metals#5531 (unfortunately currently blocked on a semanticdb issue)

@kasiaMarek kasiaMarek changed the title Metals side tab on fresh install: "There is no data provider [...]" When no workspace and metals cannot start show error message in a more visible place Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants