Skip to content

Commit

Permalink
Merge #11244
Browse files Browse the repository at this point in the history
11244: Allow resource names that conflict with extra types r=iwahbe a=iwahbe

Fixes #11207

Co-authored-by: Ian Wahbe <ian@wahbe.com>
  • Loading branch information
bors[bot] and iwahbe committed Nov 3, 2022
2 parents 905756b + 3f71e8b commit b415bbd
Show file tree
Hide file tree
Showing 8 changed files with 668 additions and 1 deletion.
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdkgen/go
description: Allow resource names that conflict with additional types.
4 changes: 4 additions & 0 deletions pkg/codegen/go/gen.go
Expand Up @@ -3223,6 +3223,10 @@ func generatePackageContextMap(tool string, pkg *schema.Package, goInfo GoPackag
names = append(names, cgstrings.Camel(rawResourceName(r))+suffix+"State")
names = append(names, "Get"+rawResourceName(r)+suffix)
}
if goInfo.GenerateResourceContainerTypes && !r.IsProvider {
names = append(names, rawResourceName(r)+suffix+"Array")
names = append(names, rawResourceName(r)+suffix+"Map")
}
return names
}

Expand Down
Expand Up @@ -3,6 +3,10 @@
"repro/doc.go",
"repro/foo.go",
"repro/init.go",
"repro/overlap/consumer.go",
"repro/overlap/init.go",
"repro/overlap/someType.go",
"repro/overlap/someTypeMap.go",
"repro/provider.go",
"repro/pulumi-plugin.json",
"repro/pulumiTypes.go",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b415bbd

Please sign in to comment.