Skip to content

Issue 148 forward fixes JDK 25 build stage distroless WORKDIR and jdt2jar helper - #151

Merged
simbo1905 merged 4 commits into
mainfrom
issue148-forward-fixes
Aug 28, 2026
Merged

Issue 148 forward fixes JDK 25 build stage distroless WORKDIR and jdt2jar helper#151
simbo1905 merged 4 commits into
mainfrom
issue148-forward-fixes

Conversation

@simbo1905

Copy link
Copy Markdown
Owner

What

Carries the four Issue #148 follow-up fixes that were stranded on rel-2026.05.20 after the release tag, so main is corrected before the next date-based release:

  • Bump the Docker build stage in jdt2jar/Dockerfile from JDK 24 to JDK 25 LTS.
  • Fix the WORKDIR in the distroless stage and document the docker cp fallback for macOS/Colima.
  • Remove accidental temporary test artifacts from the build output.
  • Add scripts/jdt2jar.sh helper for restricted volume mount environments and clean up jdt2jar/README.md.
  • Align .github/workflows/ci.yml with the same changes.

Verification

  • Focused run: mvn -pl json-compatibility-suite,:java.util.json.jtd -am test -Djava.util.logging.ConsoleHandler.level=INFO — 451 tests, 0 failures.
  • Full reactor: mvn test -Djava.util.logging.ConsoleHandler.level=INFO — all 8 modules BUILD SUCCESS.
  • Diff vs main contains only the four intended files; no POM version bumps and no changes to the tracked ZIP test fixtures (both remain bundled and restored).

Closes the follow-up work from #148 (supersedes #150, which is closed).

@simbo1905
simbo1905 marked this pull request as ready for review August 28, 2026 20:14
@simbo1905
simbo1905 merged commit 754fe3e into main Aug 28, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b093ed6e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/jdt2jar.sh
mkdir -p "$WORK_DIR"

# Sync source (respecting .gitignore)
rsync -a --filter=':- .gitignore' --exclude='.git/' . "$WORK_DIR/"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stage ignored schema inputs before invoking Docker

When the requested schema is under any ignored path, this filter omits it from the staging directory while line 22 passes the original path unchanged to the container, so compilation fails with Schema file not found. This affects the script's own .tmp/test.jtd.json example because the repository .gitignore excludes .tmp; as rsync --help describes, --filter adds file-filtering rules, so the explicitly requested schema must be copied regardless of ignore rules.

Useful? React with 👍 / 👎.

Comment thread scripts/jdt2jar.sh
docker run --rm -v "$WORK_DIR:/work" "$IMAGE" "$@"

# Sync output back (any new .jar or .java files in the work dir)
rsync -a --include='*.jar' --include='*.java' --exclude='*' "$WORK_DIR/" ./

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recurse into output directories when syncing artifacts

When --output names a nested path such as the script's own .tmp/test.jar example, this filter does not copy the generated JAR or companion source back. rsync --help describes --include as preventing matching files from being excluded, but the parent .tmp/ directory still matches the final --exclude='*', so rsync never descends to the included files; directory traversal must also be included.

Useful? React with 👍 / 👎.

Comment thread jdt2jar/README.md
- **Interpreter** ([`json-java21-jtd`](../json-java21-jtd/README.md)): ideal for infrequent config parsing — simple, no build step, runs on JDK 21+.
- **Codegen** ([`json-java21-jtd-codegen`](../json-java21-jtd-codegen/README.md)): ideal for repeated hot-path validation — ~9x faster, but requires JDK 24+ at runtime.
- **jdt2jar**: pre-compiles schemas into validator JARs at build time (using JDK 24+), then deploys them to any JDK 21+ runtime. Best for CI/CD pipelines, distroless containers, or environments where you want JIT-optimised validators without shipping a JDK 24+ runtime.
- **Codegen** ([`json-java21-jtd-codegen`](../json-java21-jtd-codegen/README.md)): ideal for repeated hot-path validation — ~9x faster, but requires JDK 25+ at runtime.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the minimum JDK requirement aligned with the build

This now tells users that codegen requires JDK 25+, but json-java21-jtd-codegen/pom.xml and jdt2jar/pom.xml still compile with release 24, the parent profile activates on [24,), and both the top-level and codegen READMEs continue to document 24+. Either retain the 24+ minimum here or update the actual build requirement and all user documentation together so JDK 24 users are not incorrectly told the supported path is unavailable.

AGENTS.md reference: AGENTS.md:L29-L29

Useful? React with 👍 / 👎.

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.

1 participant