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

Support Live Share #167

Open
mjcrouch opened this issue Jun 16, 2020 · 0 comments
Open

Support Live Share #167

mjcrouch opened this issue Jun 16, 2020 · 0 comments
Labels
blocked Unable to progress - e.g. waiting for VS Code API to be updated enhancement New feature or request

Comments

@mjcrouch
Copy link
Owner

mjcrouch commented Jun 16, 2020

Having been using live share quite a lot recently, it would be good to be able to be able to allow users other than the host to be able to see the perforce files and potentially perform perforce operations on files.

Some thoughts around implementation

  • At a rudimentary level, it would probably be quite trivial to get most commands working, generally we could just replace the current call to execute a perforce command with one that asks the host to execute the command and return the result. If we always pass in URIs for files, we can translate any vsls: URIs to file: URIs on the host side. Probably we shouldn't accept strings for paths in commands and only ever accept URIs
  • For the few perforce commands that return local file paths, we would probably need to convert those back to vsls URIs as well - this would have to be on a per command basis since it depends on the parsing required - would need to look at where we return file paths and replace them with URIs
  • There are some cases where we probably don't want to execute the commands at-all - from what I've seen, edit on file save / add on file add already work, because it seems like the host is already getting those events even if they are done by someone else in the session
  • If someone performs an action that provides a refresh, then probably everyone in the session should refresh. We can send a broadcast message to do this - It would be nice to reduce this a bit.
    • For example, is it better for everyone in the session to hit the perforce server, or is it better for the host to just provide the list of changelists / files to all the clients whenever a refresh happens?
  • It should be possible to disable this if the host doesn't want the users to perform perforce operations
  • This would be more difficult to implement, but potentially a read-only mode. this could apply to everyone or just read-only guests - would have to work out how to indicate a command is read or write
    • one possibility is in the p4 api, mark specific command combinations (e.g. change where the -d or -i flag is specified) as write and return an error if a client tries to use that command combination

basic docs for vsls - for some reason the latest npm package is missing the readme so it took me a long time to find this..
extension sample

On furrther investigaion - the extension seemingly needs to be whitelisted due to microsoft/live-share#2896 - otherwise we can't use the shareService command

@mjcrouch mjcrouch added enhancement New feature or request blocked Unable to progress - e.g. waiting for VS Code API to be updated labels Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Unable to progress - e.g. waiting for VS Code API to be updated enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant