Skip to content

Get ABCL's REPL running on JDK 25: ZipFile state and File natives - #23

Merged
atgreen merged 1 commit into
masterfrom
abcl-status
Oct 20, 2026
Merged

atgreen merged 1 commit into
masterfrom
abcl-status

Conversation

@atgreen

@atgreen atgreen commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Re-tested ABCL 1.9.2 (issue #7) on current master with JDK 25. The REPL blocker in docs/ABCL.md (hang on stdin, stray Go on EOF) no longer reproduces, but two JDK 8 leftovers stopped ABCL right after low-level initialization. With both fixed, ABCL boots, prints its prompt and evaluates piped-in forms correctly: bignum defun, defclass/defmethod, handler-case, format, compile, and Java interop (java.version → "25").

java.util.zip.ZipFile (src/zip.lisp) is implemented in Lisp but kept its state in JDK 8's name and jzfile fields. The class takes its fields from JDK 25's ZipFile.class, which has neither (it has filePath, res, …), so any program that opens a jar directly died in the constructor:

the slot OPENLDK::|name| is missing from the object #<OPENLDK::|java/util/zip/ZipFile| …>

The path and open zip now live in a weak side table, as src/url.lisp already does for JarFile. Writing a test also turned up a missing ZipFile(String) constructor and getEntry instantiating ZipEntry before loading it, both fixed here.

UnixFileSystem natives (src/native/system.lisp): getLastModifiedTime0, getLength0 and list0 were only defined under their JDK 8 names, so File.lastModified(), length() and list() were undefined on JDK 25. The JDK 25 names are defined now, returning 0 for a missing file as the JDK does, and the old names delegate, following the existing checkAccess bridge.

Tests: new aaa/zipfile.java (opens and reads testsuite/test.jar) and aaa/filestat.java (length, mtime and listing, plus a missing file). Both print OK on the reference JVM and on OpenLDK with this change, and crash on master. waitwake, monitorwake and jitwake still pass. I couldn't run make check-regression locally (no DejaGnu here), so CI's gate is the full check.

Docs: docs/ABCL.md now has JDK 25 setup and current status, a timing table (about 3.5 min to the first prompt, about 4 min for the first compile, nearly all first-use JIT), and the remaining gaps: unimplemented file-system natives such as createDirectory0/rename0, and the stock threaded Main not yet re-tested. The README entry is updated to match, and lib/abcl/abcl.jar is gitignored.

🤖 Generated with Claude Code

ABCL now boots on JDK 25 and runs its REPL, but two JDK 8 leftovers
stopped it right after low-level initialization:

- java.util.zip.ZipFile, implemented in Lisp, kept its state in JDK 8's
  name and jzfile fields.  The class takes its fields from JDK 25's
  ZipFile.class, which has neither, so opening any jar directly failed.
  Keep the path and open zip in a weak side table instead, as url.lisp
  already does for JarFile, add the ZipFile(String) constructor, and load
  ZipEntry before getEntry instantiates it.
- UnixFileSystem's getLastModifiedTime0, getLength0 and list0 were only
  defined under their JDK 8 names.  Define the JDK 25 names, returning 0
  for a missing file as the JDK does, and have the old names delegate.

New aaa/zipfile.java and aaa/filestat.java cover both.  docs/ABCL.md and
the README now describe the JDK 25 setup and current status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@atgreen
atgreen merged commit de3d5d0 into master Oct 20, 2026
2 checks passed
@atgreen
atgreen deleted the abcl-status branch October 20, 2026 11:21
atgreen added a commit that referenced this pull request Oct 20, 2026
PRs #19-#21 and #23-#27 added aaa/jitwake, monitorwake, waitwake,
zipfile, filestat, lazyloader, reflstatic, siblingloaders and childfirst.
check-regression.sh only fails on lost passes and new failures, so a new
test is not enforced until it is in the baseline.  Core suites now 528
expected passes, up from 501; no test changed state.

Generated with make check-regression at 2e5e6db; the Running lines keep
the existing baseline's paths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@atgreen atgreen mentioned this pull request Oct 21, 2026
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