-
Notifications
You must be signed in to change notification settings - Fork 539
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
Live share integration #4308
base: master
Are you sure you want to change the base?
Live share integration #4308
Conversation
Awesome! Great contribution @quoc-ho . Let's wait for review. |
The following functionalities have been implemented on guests (on the host, everything is the same as before):
Here, * means doesn't work when the guest is on a Windows computer. This is because on Windows, Build command cannot be triggered from the guest yet (but it's not hard to implement). For now, the host can just turn on build on save. Notes on the implementation
|
I'm back. On it in the next week(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check carefully (next step will do so), yet it seems that currently synctex from guest to host then back to guest is adding a lot of lines to the code, which is making the code quite convoluted.
I would recommend removing all host-guest communications related to synctex. For guest, rely on its local optionally-installed synctex
and fallback to the bundled synctexjs
implementation. This will make the code much more maintainable.
Thanks for looking into this. I think the changes are quite minimal. The large changes in I'm traveling for quite a while so I will be available only for comments if you have questions but probably not actually writing code. |
I've done some refactoring to follow minimal intrusion. May you have a check if the new code is equivalent when available? Further, as there are some limited functionalities on Windows, it would be good to have sort of notices when related functions are invoked on win. |
Great! I'll go over the refactor by Tuesday. |
commit ff2ca23 Author: James Yu <yujianqiaojames@gmail.com> Date: Sun Aug 11 01:38:40 2024 +0800 Fix James-Yu#4334 PDF viewer position retained across vscode reloads commit be6da68 Author: Jerome Lelong <jerome.lelong@gmail.com> Date: Fri Aug 9 18:24:34 2024 +0200 Add highlighting to the extension logs (James-Yu#4331) * Fix typo in log * Highlight extension's logs * Do not highlight the finale full stop commit 693d709 Author: James Yu <yujianqiaojames@gmail.com> Date: Sat Aug 3 17:57:55 2024 +0800 Fix linter errors commit 82b7561 Author: James Yu <yujianqiaojames@gmail.com> Date: Sat Aug 3 17:56:37 2024 +0800 Add tests to queue module of compile commit 55e4c87 Author: James Yu <yujianqiaojames@gmail.com> Date: Wed Jul 31 18:49:38 2024 +0800 Fix a find root in ws test as file glob order is not static commit e9d6ec5 Author: Jerome Lelong <jerome.lelong@gmail.com> Date: Fri Jul 26 07:37:21 2024 +0200 Update grammar files to jlelong/vscode-latex-basics@4795be4 commit bf2df7f Author: James Yu <yujianqiaojames@gmail.com> Date: Mon Jul 22 00:56:18 2024 +0800 Fix James-Yu#4313 Include (arg) macro signature in package intellisense commit 53fdd38 Author: Jerome Lelong <jerome.lelong@gmail.com> Date: Mon Jul 8 15:52:47 2024 +0200 Update grammar files to jlelong/vscode-latex-basics@1deac8f
This reverts commit 5ae60c7.
Sorry for letting this slip. I'm super swamped right now, unfortunately. I'll try to do it soon. |
@krokosik I would really love to merge this as well, but I just can't find any time to complete this unfortunately. And things just get harder and harder as time passes because my branch gets more and more out of date and there are probably a lot of conflicts right now. If you can find the time to resolve all the conflicts and test thoroughly, I think you should go ahead! |
@quoc-ho Sure, I'll take a swing at it over the weekend. Do you want me to make another fork or PR or could you add me as a collaborator? |
@krokosik Great! I added you as a collaborator. |
…nto live-share-2
@James-Yu I have resolved merge conflicts and added a workaround for Windows. Apparently LiveShare works halfway as a remote VSCode environment, as it uses POSIX paths for its URI scheme, but on the other hand uses the local OS APIs. This is why I also added some small comments in Thank you so much for creating this extension and I would like to express my willingness to help with merging this as soon as possible. 🙌 |
Should I add some information to the wiki/README regarding the feature? In particular the LiveShare host needs to allow port sharing for the integration to work. |
@krokosik Great work! Before adding docs, please bear me with a few days to check the current implementation. As the changes are too hard to review in its current form, I would propose two things for us to complete:
After that, I can proceed to review the real changes. Further, I would suppose there may be an influx of issues regarding liveshare. Would you mind go on maintaining the feature in the following few weeks/months, until it becomes stable? I am very happy to invite new repository collaborators if you are also interested in any other parts of the extension 👍 |
Here it is: d2a77b0 I do think the original Further, |
viewer/components/utils.ts
Outdated
@@ -42,7 +42,7 @@ export function parseURL(): { encodedPath: string, pdfFileUri: string, docTitle: | |||
|
|||
for (let i = 0, ii = parts.length; i < ii; ++i) { | |||
const param = parts[i].split('=') | |||
if (param[0].toLowerCase() === 'file') { | |||
if (param[0].toLowerCase() === 'file' || param[0].toLowerCase() === 'vsls') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to proceed here. It would be nice to have only one constant, like the one in lw.ts
, but I guess utils
should import close to nothing. This place does not seem like the right place for such a constant, however, the pdfFilePrefix
is also duplicated in lw.ts
so I decided to also do it.
@James-Yu I have updated the PR and removed the extra Also I noticed there are some tests failing, will look into that. I relied on the devcontainer for development and testing as I didn't want to go through installing TexLive on Windows. Similiarly, I would like to use it for running tests, so I added the necessary dependencies to Dockerfiles. Hope this is okay to include in this PR. |
Continue the discussion #4305 (reply in thread).