Skip to content

Commit

Permalink
Merge #11588 #11589
Browse files Browse the repository at this point in the history
11588: Don't use *schema.Package in go codegen r=iwahbe a=iwahbe

Part of #9932
Builds on #11578

tldr: Package is not reliable when its used for an external package. We are transferring over to PackageReference, and will remove the Package field once all references to it have been removed.

11589: Don't use `*schema.Package` in nodejs codegen r=iwahbe a=iwahbe

Part of #9932
Builds on #11578

tldr: Package is not reliable when its used for an external package. We are transferring over to PackageReference, and will remove the Package field once all references to it have been removed.

Co-authored-by: Ian Wahbe <ian@wahbe.com>
  • Loading branch information
bors[bot] and iwahbe committed Dec 8, 2022
3 parents f43f549 + 7ae9c18 + 5e9bda0 commit 6f68060
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 142 deletions.
5 changes: 4 additions & 1 deletion pkg/codegen/go/doc.go
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/golang/glog"
"github.com/pulumi/pulumi/pkg/v3/codegen"
"github.com/pulumi/pulumi/pkg/v3/codegen/schema"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
)

const pulumiSDKVersion = "v3"
Expand Down Expand Up @@ -98,7 +99,9 @@ func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName

// GeneratePackagesMap generates a map of Go packages for resources, functions and types.
func (d *DocLanguageHelper) GeneratePackagesMap(pkg *schema.Package, tool string, goInfo GoPackageInfo) {
d.packages = generatePackageContextMap(tool, pkg, goInfo, nil)
var err error
d.packages, err = generatePackageContextMap(tool, pkg.Reference(), goInfo, nil)
contract.AssertNoError(err)
}

// GetPropertyName returns the property name specific to Go.
Expand Down

0 comments on commit 6f68060

Please sign in to comment.