typst: Watcher getting unresponsive (internal crash) after providing invalid path to image (at least for Neovim)

Description

I have “save on each keystroke” and every single time (99%) when I want to write something like:

#image("") // 1
#image("./") // 2
#image("./dir") // 3
#image("./dir/") // 4
#image("./dir/file.png") // 5

The rendering works on step 1 and 2. Sometime (either manual typing or autocompletion) the rest of the steps are handled fine (errors are shown and program keeps working), but sometimes it either shows error “file not found” or “… is a directory” (while internally crashing) or just shows last successful rendering and no error (while also internally crashing).

Reproduction

  1. Download watcher.zip;
  2. unzip watcher.zip;
  3. cd watcher;
  4. just;
  5. open the same pwd in a new terminal and run just log to see Typst logs in real time;
  6. in the first terminal, start writing any name of dir/file, for example, a;
  7. after the first keystroke, the Typst will freeze.

Toggle auto save plugin: <kbd>Alt</kbd> + <kbd>A</kbd> Manual save keymap: <kbd>Ctrl</kbd> + <kbd>S</kbd>

Operating system

Linux

Typst version

  • I am using the latest version of Typst

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

I’ve created a Docker + Docker Compose + Just reproduction bundle in the OP.

Thanks, I will take a look at it tomorrow.