salesforce / salesforce/utam-java

Support incremental page object generation

Open
#244 1 comment 1 reaction 0 assignees View on GitHub

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 matching JsonCompilerConfig parameter.
  • A TranslatorTargetConfig.isUpToDate(...) hook so custom target configs can opt in.
  • DefaultTargetConfiguration implements 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 invoking getGeneratedCode() (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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.