add compile tests, and fix a dependency loop. also make hook notify watcher optional.