News for hackers. Stuff that matters.
Re:When to use Bazel? by vbezhenar on Tuesday September 13, 2022 @06:26PM (#32830966)
Does it re-read every single source file to find out which were changed? Sounds like a terrible approach. Or it uses mtime first and checksum after that?
Re:When to use Bazel? by joshuamorton on Tuesday September 13, 2022 @07:06PM (#32831286)
Mtime first is unreliable on modern (fast) machines, you can edit a file twice in a single second. I think bazel has a daemon watch for file changes, but I'm not certain of that.
Re:When to use Bazel? by simoncion on Wednesday September 14, 2022 @12:37AM (#32833372)
ext4, btrfs, XFS all use nanosecond time resolution.
Re:When to use Bazel? by jpollock on Wednesday September 14, 2022 @12:39PM (#32839666)
Think remote file system where a different node is providing the mtime, so it can have substantial diffs between nodes.
Re:When to use Bazel? by oftenwrong on Wednesday September 14, 2022 @05:20AM (#32834868)
Bazel has a stateful server component that caches information about the build graph and source files in memory. As you said, this allows it to check mtimes first to avoid re-computing hashes for source files.

Bazel can also read source file hashes from the filesystem if the filesystem supports it.

Re:When to use Bazel? by jxramos on Wednesday September 14, 2022 @01:41AM (#32833677)
My understanding is that somehow the bazel server tracks all that and keeps a hot process for monitoring the source files somehow to make the file io more bearable.