Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid "internal" import in SDK gen #90

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix invalid "internal" import in SDK gen #90

wants to merge 3 commits into from

Conversation

blampe
Copy link

@blampe blampe commented Mar 7, 2024

  • Add Metadata to the provider, including GoPackageInfo which fixes the invalid "internal" import we were generating with the SDK.
  • Update pu/pu and go-provider to latest.
  • Turn on generics while we're in here.
  • Add .gitattributes to ignore generated SDK code by default.

Workaround for pulumi/pulumi#13756.

@blampe blampe requested a review from iwahbe March 7, 2024 22:20
Comment on lines +37 to +46
Metadata: schema.Metadata{
DisplayName: "xyz",
Description: "Provider boilerplate",
LanguageMap: map[string]any{
"go": gen.GoPackageInfo{
Generics: gen.GenericsSettingGenericsOnly,
ImportBasePath: "github.com/pulumi/pulumi-xyz/sdk/go/xyz",
},
},
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the meat of the change.

Comment on lines +10 to +12
"github.com/pulumi/pulumi-xyz/sdk/go/xyz/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how examples were able to pass with this import...

@blampe blampe changed the title Fix invalid "internal" import Fix invalid "internal" import in SDK gen Mar 7, 2024
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the base path is good. I have mixed feelings on setting Generics: gen.GenericsSettingGenericsOnly. I don't think pulumix is stable. On the other hand, neither is this repo. I don't want to block on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants