Skip to content

mds watch --debounce 0: an in-place editor save can compile the 0-byte truncate intermediate and leave a transiently empty output #380

Description

@dean0x

std::fs::write-style saves (VS Code and others truncate in place) produce two inotify content events; at an explicit --debounce 0 the watcher can read the file between them, compile an empty source (content changed → Recompiled) and write an empty output before the real content lands. Observed in CI as the i16–i20 vars-file tests (cli_watch.rs:4370, :4448) on ubuntu-latest (runs 34366009518, 34404318888). The test harness is being fixed to write atomically (temp + rename, one event), which leaves the product behaviour for real users unchanged and documented here. Candidates: honour Access(Close(Write)) on Linux (notify already subscribes IN_CLOSE_WRITE); or reject a 0-byte read of a previously non-empty source. Refs #318 #320.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions