Skip to content

--file-watch triggers rebuild when I open a file with my editor #912

@ezyang

Description

@ezyang

Steps to reproduce:

  1. stack build --file-watch some project; wait till it quiesces.
  2. Run vim -u /dev/null on a file in the project

Expected result: Stack does not rebuild.

Actual result: Stack rebuilds.

More observations: vim -n -u /dev/null does not cause a rebuild, so Vim's swapfile support seems to be related? However, when I looked at the inotify traces I didn't see anything too different.

Since inotify is probably related, here's the kernel version:

[ezyang@hs01 ghc-quick3]$ uname -a
Linux hs01.scs.stanford.edu 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions