Skip to content

perf(build): pin target-platform executionEnvironment to JavaSE-21#1462

Draft
joaodinissf wants to merge 1 commit into
dsldevkit:masterfrom
joaodinissf:m4/pin-ee
Draft

perf(build): pin target-platform executionEnvironment to JavaSE-21#1462
joaodinissf wants to merge 1 commit into
dsldevkit:masterfrom
joaodinissf:m4/pin-ee

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

target-platform-configuration in ddk-parent/pom.xml declares no <executionEnvironment>. Tycho then adds the profile of the JDK running Maven (e.g. JavaSE-26) alongside the bundles' BREE — all 60 plugins declare JavaSE-21 — and resolves the target definition once per profile, on every build:

Resolving target definition ... execution environment=...'JavaSE-26'...
Resolving target definition ... execution environment=...'JavaSE-21'...

The resolution result (and therefore the build) also silently varies with whichever JDK happens to run Maven.

Change

Pin <executionEnvironment>JavaSE-21</executionEnvironment>, matching the BREE all bundles declare.

Measured (local, macOS aarch64, JDK 26 running Maven)

  • Target resolutions per build: 2 → 1 (log- and probe-verified).
  • Wall time: within noise (~0.1–0.7 s marginal saving; the removed resolution's apparent 1.5 s cost was mostly one-time repository loading that moves into the surviving resolution). The primary value is determinism: resolution no longer depends on the JDK running the build.
  • Gates: full mvn clean package green; compiled class-file major version unchanged (65 / Java 21).

CI numbers (added after workflow runs)

verify workflow, ubuntu runner: 13m16s (green, first run) vs recent master runs median ~13m25s (n=8, range 11m49s–18m34s) — parity, as expected: the pin removes a redundant resolution whose marginal cost is sub-second; its value is determinism, not CI wall time.


Assisted by Claude.

Without an explicit <executionEnvironment>, Tycho adds the profile of the
JDK running Maven (e.g. JavaSE-26) alongside the bundles' BREE (JavaSE-21,
declared by all 60 plugins), causing the target definition to be resolved
once per profile on every build. Profiling attributed ~1.5s of each warm
build to the redundant second resolution. Pinning to the BREE removes it.

Assisted by Claude.
Comment thread ddk-parent/pom.xml
<arch>${osgi.arch}</arch>
</environment>
</environments>
<executionEnvironment>JavaSE-21</executionEnvironment>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants