Skip to content

codegen: resolve language chooser markup in generated SDKs #2210

Description

@pose

Context

Consumer half of pulumi/pulumi#16099, under epic pulumi/home#4787. pulumi-java's gen-sdk codegen leaks language chooser markup into generated SDKs: description routes through codegen.FilterExamples (which only filters fenced code examples, not the chooser), and deprecationMessage is emitted via formatForeignBlockComment/printObsoleteAttribute (pkg/codegen/java/gen.go) with no resolution at all.

Acceptance criteria

  • Generated Java SDK description and deprecation strings contain no <span pulumi-lang-*> inflection markup nor <!--Start PulumiCodeChooser -->…<!--End PulumiCodeChooser --> blocks; the language-appropriate token/example is rendered.
  • Resolution is applied to both description and deprecationMessage, at every level (package, resource, function, type, property, enum value).
  • Covered by a codegen test using a schema that carries chooser markup (e.g. a renamed/deprecated field).

Prior art: pulumi-terraform-bridge/pkg/tfgen/schemafilter.FilterSchemaByLanguage (field-agnostic, handles both markup forms). (Correction: gen-sdk does not resolve this for any SDK language — dotnet only XML-escapes it in doc comments; tracked for dotnet at pulumi/pulumi-dotnet#1023 and for go/nodejs/python at pulumi/pulumi#16099.)

Part of pulumi/home#4787.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions