pulumi/pkg/codegen/go
Abhinav Gupta 42e7dc1fa3
pcl/codegen: Fix typeNameID data race
generator.argumentTypeName increments a typeNameID global variable.
This causes a data race when tests run in parallel:

```
WARNING: DATA RACE
Read at 0x000005d9dd28 by goroutine 20:
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).argumentTypeName()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:775 +0x84
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).genObjectConsExpression()
  ...

Previous write at 0x000005d9dd28 by goroutine 19:
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).argumentTypeName()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:775 +0xa4
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).genTemplateExpression()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:672 +0xbe
```

This variable is not used anywhere else in the system.
Fix the data race by deleting the variable.
2023-01-19 11:07:26 -08:00
..
gen_program_test all: gofmt -w -s 2023-01-10 19:03:24 -08:00
doc.go Initial implementation of simplified invokes for dotnet and nodejs 2023-01-11 14:17:14 -08:00
doc_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen.go pkg: Drop unnecessary printfs 2023-01-13 12:41:56 -08:00
gen_crd2pulumi.go Repair tests expecting nil slices 2023-01-11 21:53:04 -08:00
gen_program.go unused: Remove unused functions and types 2023-01-12 09:55:34 -08:00
gen_program_expression_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen_program_expressions.go pcl/codegen: Fix typeNameID data race 2023-01-19 11:07:26 -08:00
gen_program_json.go unused: Remove unused functions and types 2023-01-12 09:55:34 -08:00
gen_program_optionals.go [codegen/go] Improve optional params in invoke 2022-02-01 11:44:40 -08:00
gen_program_read_dir.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_program_splat.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_program_ternaries.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_program_test.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
gen_program_utils.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
gen_spill.go Reify `Input` and `Optional` types in the schema type system. (#7059) 2021-06-24 09:17:55 -07:00
gen_test.go golangci-lint: Enable staticcheck 2023-01-14 16:59:46 -08:00
importer.go Add `modulePath` to go 2022-10-10 16:01:53 -07:00
test.go fix(ci): Split programgen tests over more jobs 2022-10-16 23:20:45 -07:00
utilities.go Handle field name overlaps 2022-11-07 15:40:14 -05:00
utilities_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00