From d7ae3a111bd75df44dda69b37da945b50d5133e2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 3 Apr 2025 14:35:27 +0200 Subject: pkg/ifuzz: fix generate/build Currently the commands we have in go:generate first create an empty file and then write final contents. This breaks any parallel builds of the source. Even running go generate ./... does not work. Write output files atomically. --- sys/fuchsia/fidlgen/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/fuchsia/fidlgen/main.go b/sys/fuchsia/fidlgen/main.go index ab2bcf0cd..315d6a466 100644 --- a/sys/fuchsia/fidlgen/main.go +++ b/sys/fuchsia/fidlgen/main.go @@ -91,7 +91,7 @@ func main() { return pos.File == file })) - if err := osutil.WriteFile(file, desc); err != nil { + if err := osutil.WriteFileAtomically(file, desc); err != nil { tool.Fail(err) } } -- cgit mrf-deployment