Merge "Parallelize VerifyProvidersWereUnchanged" into main
diff --git a/context.go b/context.go
index fdfb66a..e8ca7ed 100644
--- a/context.go
+++ b/context.go
@@ -4541,7 +4541,7 @@
shardedModules := proptools.ShardByCount(modules, len(fileNames))
ninjaShardCnt := len(shardedModules)
for i, batchModules := range shardedModules {
- go func() {
+ go func(i int, batchModules []*moduleInfo) {
f, err := os.OpenFile(filepath.Join(c.SrcDir(), fileNames[i]), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, OutFilePermissions)
if err != nil {
errorCh <- fmt.Errorf("error opening Ninja file: %s", err)
@@ -4552,7 +4552,7 @@
defer buf.Flush()
writer := newNinjaWriter(buf)
errorCh <- c.writeModuleAction(batchModules, writer, headerTemplate)
- }()
+ }(i, batchModules)
nw.Subninja(fileNames[i])
}
diff --git a/go.mod b/go.mod
index b897b92..9caab2c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,3 @@
module github.com/google/blueprint
-go 1.21
+go 1.22