third-party schemas ignore the project name in build files
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
What happened?
A name and description are required for publishing (ref #908), but ctx.PackageName is only set if the schema is published by Pulumi:
https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/templates_gradle.go#L212-L219
This then ends up empty:
https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/build.gradle.template#L127-L131
Example
This package:
version := semver.MustParse("0.37.1")
pkg := &schema.Package{
Name: "thirdparty",
Homepage: "https://external.com",
License: "Apache-2.0",
Repository: "https://github.com/foo/foo-thirdparty",
Description: "Not published by Pulumi",
Version: &version,
}
deps := map[string]string{
"com.pulumi:pulumi": "0.1.0",
"com.pulumi:aws": "5.4.0",
"com.pulumi:kubernetes": "3.19.1",
}
info := &PackageInfo{Dependencies: deps}
return pkg, info
Generates:
pom {
inceptionYear = ""
name = ""
packaging = "jar"
description = " "
Output of pulumi about
p-java 1.12
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
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/templates_gradle.go at the cited context assignment, then inspect pkg/codegen/java/build.gradle.template where the project name is emitted. Reproduce the example package generation and confirm the generated pom has the package name and description populated for third-party schemas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100