pulumi / pulumi/pulumi-java

codegen: resolve language chooser markup in generated SDKs

Open
#2,210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/codegen
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 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.