Skip to content

v1.6.1 prep: Java 17 baseline migration#14

Merged
DemchaAV merged 7 commits intodevelopfrom
feature/java-17-baseline
May 9, 2026
Merged

v1.6.1 prep: Java 17 baseline migration#14
DemchaAV merged 7 commits intodevelopfrom
feature/java-17-baseline

Conversation

@DemchaAV
Copy link
Copy Markdown
Owner

@DemchaAV DemchaAV commented May 9, 2026

What this is

Maintenance + compatibility patch for v1.6.1. Drops the Java 21 source/target baseline to Java 17+ so the library can ship into older enterprise stacks without a fork, and refreshes test/build dependencies (incl. CVE pass). No public API change — engine, DSL, themes, templates, and backend records all stay source-compatible with v1.6.0; existing callers compile and behave unchanged.

Co-developed with @jottinger via #11 (deps refresh + ByteBuddy for Java 25 compat) and #12 (engine source migration to Java 17). Their three commits are preserved at the bottom of this branch with original authorship; the top commits close the gaps those PRs left.

Closes #8 · supersedes #11 · supersedes #12.

Why v1.6.1, not v1.7.0? SemVer-correct: no new public API, no breaking changes on the engine surface, no migration guide needed for users. Compatibility expansion + dependency hygiene fits the patch slot. Maven Central distribution (#7) — the one true minor-level change — stays queued for v1.7.0 alongside JMH migration.

What's in the branch (oldest → newest)

Commit Author What
5b7d6d4f @jottinger Updates module dependencies (Jackson, Logback, Mockito, ByteBuddy, plugin bumps)
2e32eb5d @jottinger Updating benchmarks dependencies for CI/CD
af1f82af @jottinger Updates code to conform to java 17 (engine source migration)
11d48d1f @DemchaAV v1.7 prep: complete the Java 17 baseline migration (gaps closed below)
2b1f64f1 @DemchaAV ci: trigger CI on PRs to any base + on develop pushes
eda21695 @DemchaAV docs(changelog): reframe Java 17 baseline as v1.6.1 (patch), not v1.7

The "v1.7 prep" wording in commit 11d48d1f is left as-is to preserve history; the user-facing CHANGELOG entry has been reframed to v1.6.1 — Planned in eda21695.

Gaps closed by my follow-up commits

  • examples/pom.xml <maven.compiler.release> 21 → 17 (upstream only flipped root + benchmarks).
  • examples/.../WeeklyScheduleRenderer.java — two switch-with-deconstruction blocks (DayShift / Half) and one instanceof Half.StatusFill(ShiftStatus) rewritten as Java 17 instanceof if-else chains.
  • benchmarks/.../BenchmarkMedianTool.java — 9× List.getFirst().get(0) (JEP 431, Java 21).
  • benchmarks/.../ComparativeBenchmark.java — 2× Thread.currentThread().threadId().getId() (threadId is Java 19+).
  • .github/workflows/ci.ymlactions/setup-java java-version: '21''17' across all five jobs; trigger relaxed to run on PRs to any base branch + on develop pushes (otherwise feature-branch PRs wouldn't trigger CI).
  • README.md — Java-21 badge → Java-17+.
  • CHANGELOG.md — new ## v1.6.1 — Planned entry detailing the Java 17 baseline + dependency refresh, with @jottinger credited upfront. Maven Central note moved to "queued for v1.7".

Verification

Check Result
CI on Temurin JDK 17 (run 25596172760) ✅ 4 / 4 active jobs green (Architecture+Documentation Guards, Build+test, Performance Smoke, Examples Generation)
Test suite (XML aggregation) 819 / 0 / 0 / 0 — identical to main, zero regression
./mvnw -B -ntp -f examples/pom.xml clean compile BUILD SUCCESS
./mvnw -B -ntp -f benchmarks/pom.xml clean compile BUILD SUCCESS
Java 21 pattern scan (getFirst, getLast, threadId, switch-with-deconstruction) across src/, examples/src/, benchmarks/src/ clean

Note: local Maven runs on Java 21 with -release 17, which catches compile-time API drift but not runtime-only Java 21 dependencies. The CI run above on Temurin 17 is the truth source for the runtime side, and it's green.

Release plan

pwsh ./scripts/cut-release.ps1 -Version 1.6.1 after merge — script flips POMs to 1.6.1, dates the CHANGELOG entry, commits + tags v1.6.1, pushes.

Status

🚧 Draft. Ready to flip to "Ready for review" once @DemchaAV eyeballs the diff and approves the merge plan.

jottinger and others added 5 commits May 9, 2026 08:53
* Main focus is on bytebuddy, BUT
* Also updates other dependencies to update CVE issues
* Does not fully address submodules, as they're out of scope and should be backwards compatible anyway
* Migrates pattern-matched switch to alternatives
* Migrates new List access methods to alternatives
* Changes PreviewCompiler in src/test/java to use Maven-specified compiler version
Builds on @jottinger's three commits cherry-picked above:

- 5b7d6d4 Updates module dependencies        (=#11 base)
- 2e32eb5 Updating benchmarks dependencies   (=#11 follow-up)
- af1f82a Updates code to conform to java 17 (=#12)

Follow-up gaps closed by this commit:

- examples/pom.xml — flip <maven.compiler.release> 21 → 17 (only
  the root and benchmarks POMs were flipped upstream).
- examples/.../WeeklyScheduleRenderer.java — rewrite the two
  switch-with-deconstruction blocks (DayShift / Half) plus the
  StatusFill instanceof-with-record-pattern check as Java
  17–compatible instanceof if-else chains. Records still expose
  status() / shift() / lunch() / dinner() so call sites are a
  one-line refactor each.
- benchmarks/.../BenchmarkMedianTool.java — 9× List.getFirst() →
  .get(0) (List.getFirst is JEP 431, Java 21).
- benchmarks/.../ComparativeBenchmark.java — Thread.threadId() →
  Thread.getId() (threadId is Java 19+).
- .github/workflows/ci.yml — actions/setup-java java-version
  '21' → '17' across all five jobs.
- README.md — Java-21 badge → Java-17+.
- CHANGELOG.md — new "## v1.7.0 — Planned" entry detailing the
  Java 17 baseline, dependency refresh, and Maven Central
  distribution plan; credits @jottinger upfront.

Local verification on this worktree:

- ./mvnw -B -ntp clean verify -pl . → 785 / 0 / 0 / 0
- ./mvnw -B -ntp -f examples/pom.xml clean compile → BUILD SUCCESS
- ./mvnw -B -ntp -f benchmarks/pom.xml clean compile → BUILD SUCCESS

Note: local Maven runs on Java 21 with -release 17, which catches
compile-time API drift but not runtime-only Java 21 hooks. The
draft PR's CI run on Temurin JDK 17 is the truth source for that.

Co-Authored-By: Joseph Ottinger <joeo@enigmastation.com>
This was referenced May 9, 2026
SemVer-correct framing: this PR adds no public API, doesn't break
v1.6.0 callers, and is mostly compatibility expansion + dependency
hygiene. That's a patch, not a minor. Maven Central distribution
(the only true minor-level change in the prior framing) stays
queued for the actual v1.7.0 alongside the JMH migration.
@DemchaAV DemchaAV changed the title v1.7 prep: Java 17 baseline migration v1.6.1 prep: Java 17 baseline + dependency refresh May 9, 2026
@DemchaAV DemchaAV changed the title v1.6.1 prep: Java 17 baseline + dependency refresh v1.6.1 prep: Java 17 baseline migration May 9, 2026
Each push and PR now runs the full canonical test suite (~819
tests, mvnw verify) against three JDKs in parallel:

  - JDK 17 — the baseline target (compiler.release=17). Lowest
    common denominator; what enterprise stacks deploy on.
  - JDK 21 — the previous baseline. Validates that bytecode-17
    still runs cleanly on the post-Java-21 sequenced-collections
    JVM after the getFirst()/getLast()/threadId() rewrites.
  - JDK 25 — the current LTS. Validates the byte-buddy 1.18.7 +
    mockito 5.23 dependency bumps that #10 motivated; without
    those, mockito breaks on the JDK 25 access rules.

fail-fast: false so a regression on one JDK doesn't mask the
status of the others. Javadoc generation runs only on JDK 17 —
its output is JVM-independent, no need to triple-bake.

The other jobs (Architecture+Documentation Guards, Examples
Generation Smoke Test, Performance Smoke Check, Weekly Benchmark
Diff) stay single-JDK on 17 — they're fast enough that adding
parallel JDKs adds no signal, and benchmark numbers across JVMs
would be noisy comparisons rather than a regression gate.
@DemchaAV DemchaAV marked this pull request as ready for review May 9, 2026 09:01
@DemchaAV DemchaAV merged commit f75fdc0 into develop May 9, 2026
7 checks passed
@DemchaAV DemchaAV deleted the feature/java-17-baseline branch May 9, 2026 09:03
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