palantir / palantir/conjure-java
Generate no-arg static constructor for union type of empty value
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 39
- Forks
- 49
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 32
Description
What happened?
Given the definition:
NoneType:
fields: {}
SomeType:
fields:
val: any
MyUnion:
union:
none: NoneType
some: SomeType
I want to be able to write MyUnion.none() instead of MyUnion.none(NoneType.of())
I've found it common to have "empty types" as part of a union
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
The issue names no file, test, or entry point. Start by locating the Java generation logic for union static constructors and its tests; done means an empty-value union member can be called as MyUnion.none() while existing constructor behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100