codegen: resolve language chooser markup in generated SDKs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
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
descriptionand 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
descriptionanddeprecationMessage, 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg/codegen/java/gen.go, tracing description through codegen.FilterExamples and deprecationMessage through formatForeignBlockComment and printObsoleteAttribute. Compare the field-agnostic handling in pulumi-terraform-bridge/pkg/tfgen/schemafilter.FilterSchemaByLanguage, then add a codegen test using a schema with chooser markup. Done means Java SDK descriptions and deprecation strings resolve the markup at every listed schema level.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100