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

Emit imports for input types from external packages #15971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Apr 17, 2024

Description

In program gen, we need to add imports for external packages that are used as input types.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2024-04-17)

Bug Fixes

  • [programgen/python] Emit imports for input types from external packages
    #15971

if r.Schema != nil {
codegen.VisitTypeClosure(r.Schema.InputProperties, func(t schema.Type) {
switch t := t.(type) {
case *schema.ObjectType:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we need to also handle EnumType here

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.

None yet

2 participants