vscode-maven
vscode-maven copied to clipboard
Corrupted Project With Live Share
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:
- Open or make a Maven project.
- Turn on Live Share and share it with somebody.
- 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.
I've opened this over a month ago, is no one going to notice this?
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.