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

fix: Don't do timeout in pvc mode after inactivity #2804

Closed
wants to merge 1 commit into from

Conversation

wookayin
Copy link
Contributor

@wookayin wookayin commented Oct 3, 2023

By default the -pvc mode will stop working after 30 mins of inactivity, where vimtex compiler and the latexmk process can fall into an inconsistent state (i.e., no longer able to build the latex project while vimtex still thinks the continuous mode is still running).

To disable this, we disable inactivity timeout in the pvc mode. Requires latexmk v4.55 (Jan 2018) or higher.

From https://texdoc.org/serve/latexmk/0

-pvctimeout
    Do timeout in pvc mode after period of inactivity, which is 30 min.
    by default. Inactivity means a period when latexmk has detected no
    file changes and hence has not taken any actions like compiling the
    document.

-pvctimeout-
    Don’t do timeout in pvc mode after inactivity.

@wookayin
Copy link
Contributor Author

wookayin commented Oct 3, 2023

Note: This would require latexmk 4.55 or higher; I'm not sure if this would be a concern. If you think we need to update the doc regarding the version requirement, or having some version-dependent feature flag, please let me know.

@lervag
Copy link
Owner

lervag commented Oct 3, 2023

Thanks! First, I agree this makes sense to include. January 2018 is soon 6 years past, right? It could make sense to claim this is a hard requirement. If anyone should experience a problem with it and open an issue, then it may spark a discussion that concludes we should be less rigid.

Still, I'm not sure - perhaps it is better to add a conditional that prevents this option from being added for old versions of latexmk?

By default the `-pvc` mode will stop working after 30 mins of inactivity,
where vimtex compiler and the latexmk process can fall into an
inconsistent state (i.e., no longer able to build the latex project
while vimtex still thinks the continuous mode is still running).

To prevent this, we disable inactivity timeout in the pvc mode.
Requires latexmk v4.55 (Jan 2018) or higher.

From https://texdoc.org/serve/latexmk/0

```
-pvctimeout
    Do timeout in pvc mode after period of inactivity, which is 30 min.
    by default. Inactivity means a period when latexmk has detected no
    file changes and hence has not taken any actions like compiling the
    document.

-pvctimeout-
    Don’t do timeout in pvc mode after inactivity.
```
@wookayin
Copy link
Contributor Author

wookayin commented Oct 5, 2023

Since we didn't have a logic for detecting and comparing version, I'm fine with having it as a strict requirement. Latexmk 4.55 would be shipped with many recent TeX distributions (since 2019), so it wouldn't have a big problem. As you said in any case we can relax version requirements later.

@lervag
Copy link
Owner

lervag commented Oct 11, 2023

Sorry for the late response!

Yes, I agree, let's assume this works and then handle potential issues if it turns out users are on old versions of latexmk. (It may annoy some users, but they should probably be made aware that they are using old versions of software.)

lervag added a commit that referenced this pull request Oct 11, 2023
@lervag lervag closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants