-
-
Notifications
You must be signed in to change notification settings - Fork 806
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
error: file not found (searched at <file path>)
after 6999be
#3312
Comments
@frozolotl any ideas? |
Can't reproduce on macOS. |
I have absolutely no idea. I can't think of anything that might cause this issue. I can't reproduce it on Linux either. @itsjunetime, can you start a new shell, run Footnotes |
So it looks like it does only reproduce after 6999be9, but also only happens when I save from neovim. If I do Perhaps neovim does something like deleting the file and then re-creating it, which causes a race condition in how we watch the file? |
Ah, yes - if I run |
Team - is it a good idea to let Typst pause for like 100 milliseconds before recompiling upon a file change event? It might be able to address this issue - I think many vim (or apps that act similarly) users would run into it. |
I am having a similar issue with VSCode which may be caused by this same commit (as per @frozolotl), when I save in VSCode, it causes two incremental compilations in a row, while it's not major in itself, it makes doing performance measurements in incremental for #3307 very difficult. EDIT: running on Ubuntu 22.04.3 LTS under WSL, everything up-to-date, etc. |
Integrating an intentional lag would be very unfortunate. I think we should also not jump to this quite as quickly since the problem is new and we haven't added intentional lag before either. I really wonder what caused this. |
@frozolotl I read the diff again and this looks very sus, not sure why I didn't notice that in code review: https://github.com/typst/typst/pull/2665/files#diff-ea95583ebe87e25ee323e9ad5d1a654f2fbf243e9f4d1727c49d7271585149bdL40-R46 Why was this changed again? It skips all but the first event in the queue. Note that the old code had a double-loop where the new one has a single one. |
It was originally changed so that the |
Would they really have to wait that long? The event receiving in the for loop has a timeout of 100ms after all. |
Prior to my change and in the proposed patch #3364, yes. That's because there first is a |
Makes sense. |
Supersedes typst#3364 and fixes typst#3312, as well as typst#2714.
Supersedes typst#3364 and fixes typst#3312, as well as typst#2714.
Description
After commit 6999be9, running
typst watch <file.typ> <file.pdf>
shows the errorerror: file not found (searched at <file.typ>)
whenever the file is saved (with or without modificiations) and doesn't write/save the generated pdf file.This error occurs on 426445e as well (the only commit after the one that introduced the bug) and does not appear before 6999be9, as far as I can tell.
I tried to look at the changes introduced in 6999be9, but couldn't figure out what exactly might've caused this issue as I'm not familiar with the codebase.
Reproduction URL
No response
Operating system
Linux
Typst version
The text was updated successfully, but these errors were encountered: