Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Recompilation is triggered on every keystroke in irrelevant file #199

Open
Enivex opened this issue Dec 12, 2023 · 1 comment
Open

Recompilation is triggered on every keystroke in irrelevant file #199

Enivex opened this issue Dec 12, 2023 · 1 comment

Comments

@Enivex
Copy link

Enivex commented Dec 12, 2023

Describe the bug
See title

To Reproduce

  1. Open a folder in VS code, containing a typ file and another file not involved in the typst document at all
  2. Preview the typ file
  3. Any keystroke in the other file will trigger recompilation of the typst preview

Expected behavior
Recompilation should only be triggered if the file is somehow included in the typst document. This is the behavior I see with typst watch.

Package/Software version:

VSCode version(Help -> About):

Version: 1.85.0 (user setup)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T20:48:09.019Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22635

typst-preview extension version: v0.10.0

Logs:
typst-preview server log(Output Panel -> typst-preview):

[2023-12-12T12:48:16Z DEBUG typst_preview::actor::editor] EditorActor: received message from editor: UpdateMemoryFiles ["REDACTED\numerics\\periodic.py"]
[2023-12-12T12:48:16Z DEBUG typst_preview::actor::typst] TypstActor: processing UPDATE memory files: ["REDACTED\\numerics\\periodic.py"]

(The typ file is in the REDACTED folder, and I'm editing a py file in a subfolder)

@7sDream
Copy link
Contributor

7sDream commented Jun 7, 2024

I think this is caused by #166, and it's an expected behavior.

You can see more context in issue #164, in which we discussed why this temporary solution was chosen.


Oh, I see it's an update memory file message, not a sync preview. Therefore, it's not relevant to the issue or PR mentioned above. However, the underlying reason behind them seems to be the same?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants