sparse-intern-71089
09/04/2023, 7:28 PMmillions-army-91633
09/05/2023, 6:42 PMpulumiTypes.go
is generated for Input indeed in my case the generated object ObjectMetaArgs
is emptybillowy-army-68599
millions-army-91633
09/06/2023, 6:31 PM<http://github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes|github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes>
to reference internal package or
that ObjectMetaArgs
is empty ?millions-army-91633
09/06/2023, 6:32 PMbillowy-army-68599
millions-army-91633
09/06/2023, 7:02 PMmillions-army-91633
09/09/2023, 10:19 PMconst objectMetaRef = "#/types/kubernetes:meta/v1:ObjectMeta"
https://github.com/pulumi/crd2pulumi/blob/master/pkg/codegen/schema.go#L59
these ref is used for metadata type here https://github.com/pulumi/crd2pulumi/blob/master/pkg/codegen/packagegenerator.go#L181
and after this during import generation in pulumi codegen
https://github.com/pulumi/pulumi/blob/master/pkg/codegen/go/gen.go#L2820
one case seems to be missing for *schema.TokenType:
something like this maybe :
case *schema.TokenType:
if importExternal(t.Token) {
break
}
mod := pkg.tokenToPackage(t.Token)
if mod != pkg.mod {
p := path.Join(pkg.importBasePath, mod)
importsAndAliases[path.Join(pkg.importBasePath, mod)] = pkg.pkgImportAliases[p]
}
but when i try this a second problem appear the function importExternal
which use isExternalReferenceWithPackage
don’t know how to deal with Token Type too here https://github.com/pulumi/pulumi/blob/master/pkg/codegen/go/gen.go#L625.millions-army-91633
09/09/2023, 10:21 PMtyp.Token
:
case *schema.TokenType:
pkg.tokenToPackage(typ.Token)
typ.Token
tokenToPackage()
// isExternal = typ.UnderlyingType != nil && !codegen.PkgEquals(typ.UnderlyingType, pkg.pkg)
// if isExternal {
// extPkg = typ.PackageReference
// token = typ.Token
// }
return