go generate "scripts" may fail to work in parallel and people will ask why not, even though they shouldn't have used the -parallel option in those cases in the first place.
But /go:generate go run mysafeparallelgen.go can be used today. On Tue, Aug 29, 2017, 07:14 Guanhua Jiang <steve.ji...@gmail.com> wrote: > I'm just wondering if there has been discussions about having "go > generate" tool support a "-parallel n" flag such that it would run go > generate on each file concurrently throughout a package(s). The motivation > is this: a typical build process that involves file generation may need to > support the //go:generate directive in any arbitrary file in the repo. When > the number of files gets larger and larger, it essentially iterates over > each file to trigger the commands, as generate.go:155 > <https://github.com/golang/go/blob/master/src/cmd/go/internal/generate/generate.go#L155> > suggests. > I'm wondering if there's anything stopping us from supporting going through > all of these files concurrently; and if not, would it be a nice feature to > support for "go generate"? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.