salesforce / salesforce/utam-java
Support incremental page object generation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 34
- Forks
- 23
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 2
Description
Problem
When utam-java is consumed via the compiler plugin in a downstream project, every mvn invocation triggers an all-or-nothing rebuild of every page object. google-java-format dominates the cost, so iterative dev loops pay the full formatting bill even when only one .utam.json source has changed.
Proposal
Add an opt-in incremental mode to the compiler that skips generation for page objects whose generated .java artifacts are already newer than their source .utam.json. This preserves current default behavior while giving downstream consumers a large speedup on repeated builds.
Suggested shape
- A CLI flag (e.g.
--incremental/-I) and matchingJsonCompilerConfigparameter. - A
TranslatorTargetConfig.isUpToDate(...)hook so custom target configs can opt in. DefaultTargetConfigurationimplements the check via per-page-object mtime comparison: regenerate iff any expected target is missing or older than the source.DefaultTranslatorRunner.write()consults the hook before invokinggetGeneratedCode()(where the formatter runs) and skips per-PO writes for up-to-date page objects. Aggregate outputs (manifest, DI config) still include every PO.
Linked PR
#243
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 by reviewing linked PR #243, then trace DefaultTranslatorRunner.write(), TranslatorTargetConfig.isUpToDate(...), DefaultTargetConfiguration, and JsonCompilerConfig. Verify the CLI option and configuration reach the runner, up-to-date page objects skip getGeneratedCode(), missing or older targets regenerate, and aggregate outputs still include every page object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100