From a391da6c77346078c79168b8aba39844dcde9130 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 6 May 2024 17:25:21 +0900 Subject: [PATCH] examples/shaderprecomp/metallib: stop using errgroup --- examples/shaderprecomp/fxc/gen.go | 1 + examples/shaderprecomp/metallib/gen.go | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/shaderprecomp/fxc/gen.go b/examples/shaderprecomp/fxc/gen.go index 8d8215069..7a6457469 100644 --- a/examples/shaderprecomp/fxc/gen.go +++ b/examples/shaderprecomp/fxc/gen.go @@ -68,6 +68,7 @@ func run() error { srcs = append(srcs, defaultSrc) for _, src := range srcs { + // Avoid using errgroup.Group. // Compiling sources in parallel causes a mixed error message on the console. if err := compile(src, tmpdir); err != nil { return err diff --git a/examples/shaderprecomp/metallib/gen.go b/examples/shaderprecomp/metallib/gen.go index b15413185..1804c9da9 100644 --- a/examples/shaderprecomp/metallib/gen.go +++ b/examples/shaderprecomp/metallib/gen.go @@ -24,8 +24,6 @@ import ( "os/exec" "path/filepath" - "golang.org/x/sync/errgroup" - "github.com/hajimehoshi/ebiten/v2/shaderprecomp" ) @@ -54,15 +52,12 @@ func run() error { } srcs = append(srcs, defaultSrc) - var wg errgroup.Group for _, src := range srcs { - source := src - wg.Go(func() error { - return compile(source, tmpdir) - }) - } - if err := wg.Wait(); err != nil { - return err + // Avoid using errgroup.Group. + // Compiling sources in parallel causes a mixed error message on the console. + if err := compile(src, tmpdir); err != nil { + return err + } } return nil }