Skip to content

Infinite reload loop with auto-appended snippets / mkdocstrings-python paths #434

@pawamoy

Description

@pawamoy

Context

Version 0.0.25 introduced file watching for auto-appended snippets. In some cases, this now triggers infinite rebuild loops.

I noticed the same behavior with previous versions, for Python source files (watched because listed in the paths option of mkdocstrings-python).

Bug description

  • When auto-appending snippets that are stored under the docs/ folder, an infinite rebuild loop triggers.
  • When listing folders under docs in mkdocstrings-python's paths option, an infinite rebuild loop triggers.

Moving these watched files/folders out of the docs/ directory fixes the issue.

My understanding was that it's an issue with the file-watcher, and I've been able to confirm (and fix) that. Sending a PR right away 🙂

Related links

Reproduction

reproduction.zip

Steps to reproduce

  1. unzip, cd into
  2. run uv run zensical serve, observe the infinite rebuild loop

This repro only shows the issue triggered by auto-appended snippets. I can provide another one for mkdocstrings-python's paths if needed (but it really boils down to the same file-watching issue).

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions