4 ms·
What do you mean that Ant/Maven don't have "incremental process"? They don't do incremental builds at all? There is an additional distinction between "top dow
by chubot 10y ago
What do you mean that Ant/Maven don't have "incremental process"? They don't do incremental builds at all?
There is an additional distinction between "top down" and "bottom up" incremental builds as mentioned in this article about tup.
NEITHER Make or Bazel do bottom up builds. They are top down. That means that incremental builds requires O(n) stat() or hashes. You have to check if ANY input is out of date.
In contrast, tup does O(1) work for incremental builds by using inotify.
In practice, I'm not sure how much this matters, but it is interesting -- and it is the central point of the linked article. Ninja has a reputation for being fast, and it also does top-down builds. As I recall the Linux kernel is quite good at caching inodes for stat() calls, so you can basically stat millions of files in under a second. (Windows may be a different story.)
But if you are using hashes rather than timestamps, the work to check if any of a million files are out of date is much larger.
- Jtsummers 10y agoinotify is only available on linux so `tup monitor` doesn't work on all OSes. But other platforms have similar libraries so it's possible to port it.
- gavinpc 10y agoAre there such libraries for Windows? I can't find my notes on this, and all I remember is that `strace` looked the most promising (for a non C programer). I actually switched from Windows to Linux because of Tup—although to their credit, they have fixed the issues that I filed. I still use Tup on Windows for production at work, and in place of `tup monitor` I use a service based on .NET's file system watcher, and just tail monitor the log.[0] The config looks like this: <job at="%HOME%\some\project"> <watch> <path>script/*.js</path> <path>stylus/*</path> <path>src/**</path> <path>tools/**.cs</path> </watch> <do>tup --no-environ-check</do> </job> It's not foolproof, since I have to maintain that list, but it's better than the alternatives (whatever they are). [0] https://bitbucket.org/gavinpc/reactor/ https://bitbucket.org/gavinpc/reactor/
- Jtsummers 10y agohttps://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... Best I can find. I was referring to kqueue and FSEvent though for free bad and macOS. Sorry traveling and phone only. I wonder if the Linux on Windows stuffs will make it easy to use inotify on Windows? I've only heard of it. Haven't researched how that works.