iamhyc / Overleaf-Workshop

Open Overleaf/ShareLaTex projects in vscode, with full collaboration support.
https://marketplace.visualstudio.com/items?itemName=iamhyc.overleaf-workshop
GNU Affero General Public License v3.0
563 stars 13 forks source link

Is "Local Replica" robust now? #201

Closed yuriever closed 1 month ago

yuriever commented 1 month ago

Describe the bug

A clear and concise description of what the bug is.

Thanks for this useful extension!

This may not be a bug. I just wonder if the functionality "Local Replica" is robust now. Currently my workflow is as follows (I do not have overleaf premium):

Overleaf-Workshop for syncing with overleaf
    |
    |
local replica --- LaTeX-workshop for editing
    |
    |
github for version control

The file structure is like

.aux/
.overleaf/
    setting.json
.gitignore
main.tex

where .aux/ is the temp dir used by LaTeX-Workshop, and the content of setting.json is

{
    "uri": "..."
    "serverName": "www.overleaf.com",
    "enableCompileNPreview": false,
    "projectName": "template"
}

This has worked as expected before. But today I encountered the following situation: my collaborator added new content to the online Overleaf, and when I opened it locally, it automatically pulled the new content. However, the online version was overwritten and reverted to the original version without the new content. I tried several times but couldn’t reproduce the issue, so I’m not sure if it’s a bug or a network problem.

I notice that there is a warning in the wiki:

This feature is not considered robust yet, and may not work as expected, especially under unstable network environment. Please use it with caution.

Is this feature stable now? Do you recommend that I continue using this workflow? Or is it safer not to use the local version?

Expected behavior

A clear and concise description of what you expected to happen.

How To Reproduce

Detailed steps to reproduce the behavior.

Environment

[Optional] Developer Logs

If applicable, please paste the logs inside the details section below. Please find the logs via: Title bar "Help" > "Toggle Developer Tools" > "Console".

...
iamhyc commented 1 month ago

Not yet. Please refer to the discussions in #180 and #183.

In short, I plan to build a local version control which will track the last synced version (let's say Vi), and then the local version would be (Vi + local_changes)

The next sync with the remote version (Vj) will firstly generate a patch (Vj - Vi), then merged with the local_changes, and finally synced with remote server for consensus on (Vj+1).

If you are interested, please keep track of the other two issues. Meanwhile you can of course use local git to keep the temporary changes.

yuriever commented 1 month ago

Not yet. Please refer to the discussions in #180 and #183.

In short, I plan to build a local version control which will track the last synced version (let's say Vi), and then the local version would be (Vi + local_changes)

The next sync with the remote version (Vj) will firstly generate a patch (Vj - Vi), then merged with the local_changes, and finally synced with remote server for consensus on (Vj+1).

If you are interested, please keep track of the other two issues. Meanwhile you can of course use local git to keep the temporary changes.

Thanks for your effort! Actually, I have noticed these two issues before and am aware of the force overwritten process. It seems that the problem I encountered is not directly related to them.

If I understand correctly, the other option “Open Project in Current/New Window” won’t be affected by these issues, right? So that I can use this functionality to manually sync with overleaf.

iamhyc commented 1 month ago

If I understand correctly, the other option “Open Project in Current/New Window” won’t be affected by these issues, right? So that I can use this functionality to manually sync with overleaf.

Yes, the changes in that way will be directly synced with the overleaf server.

yuriever commented 1 month ago

If I understand correctly, the other option “Open Project in Current/New Window” won’t be affected by these issues, right? So that I can use this functionality to manually sync with overleaf.

Yes, the changes in that way will be directly synced with the overleaf server.

Thx! Got it.