pulumi / pulumi/pulumi-java

[api/suggestion] pulumi program inherit main

Open
#376 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api/suggestion area/languages kind/enhancement
Dominant language
Java
Stars
85
Forks
26
Avg merge
11h 49m
Merged PRs (30d)
22

Description

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

  • #1

We could make programs less verbose by inheriting a main method.

old

public class App {
    public static void main(String[] args) {
        int exitCode = Pulumi.run(App::stack);
        System.exit(exitCode);
    }

    public static ExportContext stack(StackContext ctx) {
        ...
    }
}

new

public class App extends PulumiMain {
    public ExportContext stack(StackContext ctx) {
        ...
    }
}
Affected area/feature

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 by reading the existing Pulumi.run(App::stack) entry point and the proposed PulumiMain/App examples in the issue. Clarify the inheritance and lifecycle design with maintainers, then define what behavior must be demonstrated for the shorter program form to be considered complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.