Skip to content

Support incremental page object generation #244

@intermezzio

Description

@intermezzio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions