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

Code-gen buildable projects by default #1537

Open
joeduffy opened this issue Jan 2, 2025 · 0 comments
Open

Code-gen buildable projects by default #1537

joeduffy opened this issue Jan 2, 2025 · 0 comments
Labels
api/suggestion API suggestion area/codegen Code generation kind/enhancement Improvements or new features

Comments

@joeduffy
Copy link
Member

joeduffy commented Jan 2, 2025

Unless I'm mistaken, Java code-gen doesn't produce buildable projects by default. You need to specify the BuildFiles option, as in:

LanguageMap: map[string]any{
    ...
    "java": javaGen.PackageInfo{
        BuildFiles: "gradle",
    },
    ...
}

This results in a build.gradle file in the root of the project. If I skip this, all that gets created is the code, with no project or build file. I expected a pom.xml in the root directly as the default.

This was not super easy to discover especially with the pulumi package gen-sdk command since it won't let you pass these options at the command line.

I love that I can opt into Gradle with the above option if that's what I prefer, but my naive assumption would have been that we generate Maven by default. It's likely we'd want an opt-out option for users who want full control.

As it stands, I believe the current behavior means Java is the only language SDK whose code-gen is not buildable by default.

@joeduffy joeduffy added api/suggestion API suggestion area/codegen Code generation needs-triage Needs attention from the triage team labels Jan 2, 2025
@justinvp justinvp added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/suggestion API suggestion area/codegen Code generation kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants