Closed tobiasdiez closed 3 years ago
Based on your logs
[11:49:28] Auto build started detecting the change of a file: d:\Research\Publications and talks\2019 - Symplectic connections\DR_symplecticConnections.tex
[11:49:28] BUILD command invoked.
I think you use latex-workshop.latex.autoBuild.run: onFileChange
and not onSave
, see https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#auto-build-latex. This is why you do not see any build triggered within the linter blocks in your logs.
I am not sure to properly understand the core issue in your problem. Does it happen that you save a modified .tex
file and yet no build is triggered? Could this be related to https://github.com/James-Yu/LaTeX-Workshop/wiki/FAQ#auto-build-does-not-work-sometimes?
Thanks for your reply. I had indeed "onFileChanged" instead of "onSave". After changing to "onSave" a build is indeed triggered. Strangely, if I change it back to "onFileChanged" it is no longer working.
Does it happen that you save a modified .tex file and yet no build is triggered?
Yes, it happens while working on a tex file: Save > Make changes > Save. So there seems to be a problem with the algorithm that detects if there are changes. I don't use OneDrive or another file sync for this file/folder; everything is managed via git.
File changes are detected by the chokidar
file watcher. We do not do anything inside the extension about it.
This may be related to #2053. To put it short, some git
operations change the inodes of the files it acts on. This results in the new files not being watched. The solution is to set latex-workshop.latex.watch.usePolling: true
.
The solution is to set latex-workshop.latex.watch.usePolling: true.
This together with "onFileChange" is still not working, so I guess the problem is lying somewhere else.
Strange. Just to make sure, when changing latex-workshop.latex.watch.usePolling: true
, you have to restart VSCode.
We have added fixes. Please open a new issue if you still see the issue after the next release.
Preliminary questions [Required]
Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue. [Required]
You still see this issue?: Yes
Make sure to visit the wiki FAQ before filling an issue.
You visited the wiki?: Yes
If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.
You can compile a TeX document manually?: Yes
Describe the bug [Required]
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
It's sadly not reproducible, but occurs often enough to be really annoying. I've already reported this issue once before at https://github.com/James-Yu/LaTeX-Workshop/issues/2514, but the conversation there is locked so I cannot add the information there.
Expected behavior
A clear and concise description of what you expected to happen.
Compile latex automatically on save.
Logs [Required]
Please paste the whole log messages here, not parts of ones. The log should start with
Initializing LaTeX Workshop
. It is very important to identify problems.LaTeX Workshop Output [Required]
Each of the linter blocks at the end are added when I save the document; so you see that this trigger at least works - but no recompilation is triggered.
Developer Tools Console [Required]
The heartbeat object at the end is added when I save.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop [Required]
Please write exact version numbers. Please don't write
latest
instead of exact numbers.Additional questions
Are you using VSCodium?
No
Are you using LaTeX Workshop with VS Code Remote?
No
If the answer is Yes, please write which one you are using. Write the versions of the remote extension.
Additional context
Add any other context about the problem here.