vscode-maven icon indicating copy to clipboard operation
vscode-maven copied to clipboard

Corrupted Project With Live Share

Open Ombrezz opened this issue 5 years ago • 2 comments

Describe the bug Maven projects are displayed as corrupted for Live Share clients, while the host isn't affected.

To Reproduce Steps to reproduce the behavior:

  1. Open or make a Maven project.
  2. Turn on Live Share and share it with somebody.
  3. The project will appear corrupted on the other person's computer.

Expected behavior The Maven project should be usable and viewable on all devices.

Environments (please complete the following information as much as possible):

  • OS: Windows 10
  • VS Code version: 1.39.2
  • Extension version 0.19.1

Screenshots Here is a screenshot of both views.

Ombrezz avatar Oct 25 '19 23:10 Ombrezz

I've opened this over a month ago, is no one going to notice this?

Ombrezz avatar Dec 03 '19 18:12 Ombrezz

Current implementation uses path of the pom.xml as the identifier of a Maven project, instead of uri. It then reads the pom.xml file, and parses metadata from that. In Live Share sessions, uri might be vsls:/pom.xml and the fsPath section is /pom.xml, it doesnt exist in the guest machine, thus metadata is corrupted.

To support Live Share, a possible solution would be, to use the complete Uri as the identifier, and call VSCode's API to read the content (instead of directly calling NodeJS fs.read). A lot of other features also rely on the mechanism, we should avoid to cause any regression bugs, thus the change will not be as trivial as it looks. It's already on the plan, but do not expect a quick fix.

Eskibear avatar Dec 04 '19 03:12 Eskibear