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

VSCode Multiprojects workspace completion is not working #664

Closed
iokacha opened this issue Apr 14, 2019 · 5 comments
Closed

VSCode Multiprojects workspace completion is not working #664

iokacha opened this issue Apr 14, 2019 · 5 comments

Comments

@iokacha
Copy link

iokacha commented Apr 14, 2019

Describe the bug
Source code navigation not working when multiple projects workspace is used under VSCode

To Reproduce
Create a VSCode workspace with multiple Project A and B
Init a Scala Project in A with SBT
Init a Scala Project in B with SBT
Let A project be the first in the list
Let B project be the second in the list

  • When hover over source code in project B, a warning is logged : code navigation does not work for the file '.../B/src/main/scala/....scala' because it doesn't belong to a build target.

Expected behavior
When navigating A project, source code navigation must be working
When navigating B project, source code navigation must also be working

Screenshots
.metals and .bloop is created under the project A only

Installation:

  • Operating system: macOS
  • Editor: Visual Studio Code
  • Metals version: v0.5.0

Additional context

Search terms
VScode multi projects workspace

@iokacha
Copy link
Author

iokacha commented Apr 14, 2019

The Only way I get this one to work, is by swap the A <-> B project order in the workspace configuration.
By rerun the metal build, the project B is correctly indexed and navigable, but the the project A SC navigation breaks with the message :

WARN code navigation does not work for the file '..../A/src/main/scala/....scala' because it doesn't belong to a build target.

@iokacha
Copy link
Author

iokacha commented Apr 14, 2019

is there a way to index both Projects A and B and potentially many other projects in the same workspace.
It is hard to work on many modules (projject) without using the workspace feature of VSCode

@olafurpg
Copy link
Member

Thank you for reporting! Multi-root workspaces are currently not supported, this functionality is blocked by two feature requests which are reported in

A possible workaround is maybe to keep two separate VS Code windows for each project instead of registering a new workspace directory.

Closing as a duplicate.

@iokacha iokacha changed the title VSCode Multiprojects workspace completion is not VSCode Multiprojects workspace completion is not working Apr 18, 2019
@drdozer
Copy link

drdozer commented Jun 24, 2019

I've hit this :( Virtually every project i work on is a multi-module project.

@bes1002t
Copy link

#5188

maybe this is the right request to keep an eye on

@tgodzik tgodzik modified the milestones: Metals v0.9.9, Metals v0.9.10 Jan 17, 2021
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

No branches or pull requests

5 participants