Skip to content

20.0.0

Choose a tag to compare

@dlbbld dlbbld released this 25 Jun 15:57
· 123 commits to main since this release
d5639b6

JPMS module boundary and public-API surface reset

ashlar-chess 20.0.0 is now a proper JPMS module with a deliberately narrow public API. This is a breaking release, and the breaks apply to plain class-path consumers too — they are package relocations, not just module encapsulation. The module name io.github.dlbbld.ashlarchess is identical to the Automatic-Module-Name shipped in 19.1.0, so adopting the named module is not itself a rename.

Breaking

  • JPMS module — module-info.java exports only the public API: board, board.enums, fen, fen.model, pgn, san, adjudication, report, unwinnability, exceptions, bitboard (BitboardPosition as documented advanced low-level API). Every other package is internal and inaccessible to modular consumers.
  • Guava removed from the public API (and the library entirely) — Guava ImmutableList/ImmutableSet/ImmutableMap return types are now JDK List/Set/Map. Drop Guava (and any requires com.google.common) from your build; ashlar-chess no longer pulls it in.
  • Public vocabulary consolidated into board — LegalMove, LegalMoveKind, UciMove, MoveSpecification, Outcome, Termination, MoveCheck, InvalidMoveException, ClaimRights, ClaimableMove, DynamicPosition now import from io.github.dlbbld.ashlarchess.board. The base exception hierarchy (ChessApiRuntimeException, UsageException, ProgrammingMistakeException, NonePointerException, FileSystemAccessException) is in the top-level exceptions package.
  • Implementation types are now hidden (moved into non-exported packages such as the *.internal subpackages, moves, squares, analyze): the move-generation engine, CastlingUtility, SquareUtility/RankUtility, the SAN/LAN generators MoveToSan/MoveToLan, UpdateSquare, MoveNumberFormat, and the Nulls/Message helpers, among others. Use the public API instead (see Added).
  • No forced logging or utility dependency — commons-lang3 and log4j are no longer dependencies; internal logging uses the JDK's java.util.logging. (org.eclipse.jdt.annotation is requires static transitive: optional and compile-only.)
  • Full unwinnability verdict collapsed back to the public domain answer — UnwinnabilityFullVerdict exposes WINNABLE, UNWINNABLE, UNDETERMINED. The proof detail lives on UnwinnabilityFullAnalysis: winnableProof() returns WinnableProof.THEOREM/HELPMATE/NONE, and mateLine() carries the concrete UCI line for searched wins.

Added

  • module-info.java — module io.github.dlbbld.ashlarchess.
  • Castling geometry on CastlingMove — kingFromSquare(Side), kingToSquare(Side), rookFromSquare(Side), rookToSquare(Side) resolve the squares a castling move touches (a castling MoveSpecification stores Square.NONE for from/to).
  • MoveSpecification.isCastling() — companion to the existing isPromotion().
  • LegalMove conveniences — isCapture(), isCastling(), isPromotion(), isEnPassant(), and enPassantCapturedPawnSquare() (the captured pawn does not stand on the move's destination square).

Internal

  • Package-by-feature reset: the duplicate by-kind buckets (model/common.model, enums/common.enums, common.exceptions) are gone; cross-cutting helpers consolidated into a single non-exported internal package; dead post-Guava code (ImmutableUtility) removed.
  • A module-boundary guard test fails the build if the exported package set or the javadoc excludePackageNames drift from the intended public API.