Skip to content

add typst-watch to monitor changes to scribble files#566

Open
capfredf wants to merge 3 commits into
racket:masterfrom
capfredf:add-typst-watcher
Open

add typst-watch to monitor changes to scribble files#566
capfredf wants to merge 3 commits into
racket:masterfrom
capfredf:add-typst-watcher

Conversation

@capfredf

@capfredf capfredf commented Jul 13, 2026

Copy link
Copy Markdown
Member

We added a small even loop to monitor scribble file changes.
We used dynamic-rerequire to reload related doc modules

@capfredf capfredf requested a review from mflatt July 13, 2026 18:53

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated
@capfredf capfredf force-pushed the add-typst-watcher branch from f7de9ed to 4f7a4ac Compare July 13, 2026 20:03
@capfredf capfredf marked this pull request as ready for review July 13, 2026 20:04
@capfredf capfredf force-pushed the add-typst-watcher branch from 4f7a4ac to 9fec48b Compare July 13, 2026 20:08

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated
@capfredf capfredf force-pushed the add-typst-watcher branch from 9fec48b to e14080b Compare July 13, 2026 20:20

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated
We added a small even loop to monitor scribble file changes.
We used  `dynamic-rerequire` to reload related doc modules.
@capfredf capfredf force-pushed the add-typst-watcher branch from e14080b to cd2492c Compare July 13, 2026 20:52

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and has added suggestions.

Comment thread scribble-lib/scribble/run.rkt Outdated
@capfredf capfredf marked this pull request as draft July 13, 2026 21:02
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

@capfredf capfredf marked this pull request as ready for review July 14, 2026 01:54

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

@capfredf

Copy link
Copy Markdown
Member Author

@mflatt Do you think I should move the code to where the typst renderer is located?

Another related question: should I put test code in tests/scribble/typst.rkt? It seems that using a command to test this feature in that file does not fit.

@mflatt

mflatt commented Jul 15, 2026

Copy link
Copy Markdown
Member

Would it make sense to have a general --watch flag instead of having a Typst-specific flag? It seems like watching could work in general.

Maybe it would also make sense to detect changes to dependencies of the main document file. The show-import-tree from syntax/moddep might be good for building the set of dependencies. Or this might create more problems than it solves; with dependencies, then there are more concerns with compiling modules, and maybe it's not ok to assume that every state is well-formed and should be loaded/rendered immediately.

For a test, I agree that it would be better to have a separate test module.

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