[HN Gopher] Poltergeist: File watcher with auto-rebuild for any ...
___________________________________________________________________
Poltergeist: File watcher with auto-rebuild for any language or
build system
Author : jshchnz
Score : 10 points
Date : 2025-08-05 16:09 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| dataflow wrote:
| If only life was so simple.
|
| So file A gets saved... a rebuild starts... and now file B gets
| saved a few seconds later.
|
| What do you do? Do you kill the build and start a new one? Do you
| wait for it to finish?
|
| What about the race conditions - what if half the build process
| sees the old contents and the other half sees the new contents of
| some of the files - do you contaminate the output/cache? Do you
| even detect it to tell the user?
| brendoncarroll wrote:
| All of those issues can be solved by doing an import of the
| changed file into the build system's content addressed store,
| and creating a new version of the entire input tree. You also
| don't need to choose between cancelling, waiting, or dropping.
| You can do 2 builds simultaneously, and anything consuming
| results can show the user the first one until a more recent one
| is available. If the builds are at all similar, then the
| similar components can be deduplicated at runtime.
|
| These techniques are used in a build system that I work on[0].
| Although it does not do automatic rebuilds like Poltergeist.
|
| [0] https://github.com/wantbuild/want
___________________________________________________________________
(page generated 2025-08-08 23:00 UTC)