Repository navigation
v0.2.8 Release Notes
Status: released 2026-11-12 (v0.2.8, GitHub release published; tag f18851e).
Previous release: v0.2.7 (0852506).
Summary (plain language)
What a regular mod developer will notice:
- More "incompatible edit" cases are refused before the reload. Annotation default values, Record
components, method/field staticness flips, deleted constructors, enum reordering or constant
add/remove, and deletion of members that still have outside readers now fail closed with a message
naming the member — instead of reporting success and crashing later. - Three silent lambda mistakes are closed. Removed lambdas no longer return
null/0to old call
sites (non-void orphans keep the previous round's return value); ambiguous fallback pairing now warns
and refuses instead of silently binding the wrong body; and classes compiled without-g(no
LocalVariableTable) now warn that captured-lambda reordering is undecidable, with an opt-in strict
mode that rejects the reload. - Still fewer "read 0/null" moments during hot reload. New/changed fields could briefly expose their
default value to other threads; that window is now also closed on the single-class dynamic path — the
route Mixin uses when a target gains a new@Uniquefield read by an@Injecthandler on the next tick. - Signature drift is no longer silent. Parameter-annotation and generic-signature changes now emit a
member-level[SIG-DRIFT]warning. - Logs are English-only, so GBK consoles and log collectors no longer garble hot-swap diagnostics.
- The Gradle plugin is less surprising. The agent jar now carries its version; the plugin compares it
with the configuredremold.versionand replaces a stale local jar. A newcleanRemoldCachetask
clears project-level caches after a version change. - Scope of this release: v0.2.8 is a safety-and-stability release. It contains the full batch of
compatibility gates merged after the v0.2.7 tag (annotation defaults, Record/staticness/constructors,
enum, signature drift, three lambda cases) plus two hot-reload reliability features (orphan lambda body
retention, two-phase dynamic redefine). The large Mixin feature set shipped in v0.2.7.
New Features
- Two-phase dynamic redefine (
redefineDynamic). The single-class entry point now consumes
InitFix.requiresTwoPhaseand runs stage A (new shape + old method bodies) → instance patch → stage C
synchronously inside the same call, so callers still see the final state and the public return
contract is unchanged. Stage C reuses the already generatedruntimeBytes(no second transformer
bridge pass, no secondInitFix.transform). Method-body-only edits keep the single-redefine fast
path. Covered byDynamicTwoPhaseRedefineTest(2/2, recordedInstrumentationasserts the call order
and bytes; mutationtwoPhase=falseturns it red) and by the real-DCEVM
redefineDynamicNoBaselineProbe(13/0, logtwo-phase: A -> patch -> C, existing instanceb=42). - Orphan lambda body retention (non-void, on by default). A removed lambda's ghost stub now keeps
the previous round's method body (frames and exception table included) when a liveness gate proves the
body only references members that still exist; otherwise it falls back to the default stub and reports
why.voidorphans stay no-op by default (-Dremold.agent.orphan_retain_void=trueopts in). Retention
logs once on first real execution and survives multiple rounds. Spec:
docs/topology/11-orphan-lambda-body-retention.md; testsOrphanBodyRetentionTest6/6. - Gradle plugin: agent version reconciliation +
cleanRemoldCache.remold-agent.jarnow writes
Remold-Version/Implementation-Versioninto its manifest; the plugin refuses to start a stale
auto-discovered agent, re-resolves by the configured version and overwrites the local copy (naming the
ignored file), while an explicitagentJaris only warned about.cleanRemoldCacheclears the
project's resolved agent/plugin copies and generated launch scripts; the cross-project shared download
cache is kept unless--globalis passed. It is deliberately not wired intoclean. - JDK-internal packages opened by the agent.
ModuleOpenerusesInstrumentation.redefineModulein
premain/agentmainto export/open nine JDK-internal packages to every unnamed module, so users no
longer need--add-exports/--add-opens. AnEVERYONE_MODULEfallback covers loaders created after
premain, and plugin initialization opens them once more for host loaders that did not exist at premain.
Safety & Compatibility Changes
- Annotation default drift fails closed. Changing, removing or adding an annotation member default is
refused by default (already-loaded consumers keep the old default; a redefine cannot backfill them):
the batch path aborts the whole round, the dynamic path refuses with a named reason. The explicit
-Dremold.agent.annotation_default_change=allowescape hatch still warns loudly. - Enum gates consolidated. Enum declaration reorder is now detected (
CHANGED_ENUM_ORDER, switch
cascades included); enum constant add/remove is diffed (addedEnumConstants/removedEnumConstants)
and refused withENUM_CONSTANT_SET_CHANGED; and the rejection reason names the measured blockers
(already JIT-compiled readers holding the old constant table until deopt,$SwitchMap$/$SWITCH_TABLE$
holders that cannot gain new cases, existingEnumMap/EnumSetinstances that cannot be resized).
The Mixin member aligner no longer swallows enum reorders by treating$VALUESand other JVM/javac
synthetics as Mixin-generated members; enum classes get no field-table reordering or tombstoning.
Backed by 30 independent-JVM probes (tests/enum-append-probe/),
docs/topology/10-enum-constant-append-infeasibility.mdandD-ENUM-1. - Lambda fallback pairing fails closed. When an old call site has no deterministic owner, the aligner
no longer silently binds it to a new body: it warns and refuses the pairing. Gate-state self-reporting,
permanent regression guards and a larger corpus (N=37) were added. - Strict mode for captured lambdas without
-g. Without aLocalVariableTable, captured parameter
names are unavailable and reorder detection silently degrades. The aligner now warns explicitly and
recordsmissingLvtLambdas;-Dremold.agent.lambda_strict=truethrows
LambdaAlignmentStrictException([HOTSWAP-REJECT], transaction rolled back so the class keeps its old
version). Covered byLambdaLvtStrictGateTest6/6. - Member-metadata drift is named. Parameter-annotation and generic-signature changes emit a
member-level[SIG-DRIFT]warning (derived-class eviction range widened); class-level generic
signatures remain a known uncovered boundary. Covered byParameterAnnotationDriftTestand
:tests:metadataDriftWarnProbe(wired into:tests:check). - Staticness flips, deleted constructors and environment-flag overrides are gated. A
static↔
instance flip is detected and refused (old call instructions would throwIncompatibleClassChangeError);
deleted constructors are checked against out-of-batch readers;-Denvironment-flag overrides are
detected by the same gate. Covered byMemberStaticnessAndConstructorScanTest(7/7, 8/8). - Record components and
@RemoldReinitextractability. Adding a Record component with live instances
is refused;@RemoldReinitauthorization now verifies that the initializer slice is actually
extractable (Record component, constructor parameter self-assignment, or no legal initializer ⇒
LAYOUT-REJECT) before allowing the overwrite. Covered by
RecordAndReinitExtractabilityGateTest5/5. @RemoldReinitcontract tightened.-Dremold.agent.force_reinitis now a real escape hatch
(defaultfalse), a per-field[REINIT] @RemoldReinit trigger on <class>line explains why a field was
replayed, an inherited-scope gate refusesINCLUDE_SUBCLASSESwhen a registered subclass writes the
same inherited field (scope = SELFis not blocked), and the Javadoc documents the "does not do" list
and the exactCONDITIONALsemantics.- Removed-member reader scan no longer fails closed on unrelated JDK references. Only provably
unrelated references are skipped (constructor owner mismatch; platform-prefix owners for non-platform
fields/static/private). Virtual instance methods stay fail-closed; rejection logs name the first three
reader classes. - Plain classes are no longer reordered as if they were Mixin output. The member aligner previously
restored baseline member order for ordinary classes too; that false positive is fixed, and the
two-phase trigger now only considers fields that would actually be written with non-zero values. - Runtime logs are English-only (17 CJK literals across 6 files translated). A new
./gradlew :tests:verifyLogLanguageguard (wired intocheck) fails on CJK/full-width punctuation in
main-source string literals. - Release-coordinate self-check is now case-sensitive.
verifyReleaseCoordinatesno longer only
asserts that POM files exist (case-insensitive filesystems hid spelling drift); it validates
<groupId>/<artifactId>/<version>as case-sensitive literals for both coordinate families. The
eight JitPack publications and all templates/docs use the real account casing
com.github.I-hope1.Remold(matchinggit remoteI-hope1). Verified: 16/16 coordinates resolve from
mavenLocal, and both templates resolvegradle-plugin:v0.2.8viahelp --offline.
Fixes
- Linux aarch64 native library (
UnsatisfiedLinkError). The platform matrix mapped Linux aarch64 to
the Android NDK artifact (bionic ABI), which cannot load under glibc.NativeLibraryNamenow resolves a
dedicated glibc-2.17libtoolaarch64.soshipped with the repo; CI validates its ABI instead of building
it (NativeLibraryNameTestlocks the matrix). - CI native-build noise. The aarch64 artifact is no longer built on the CI runner (zig's internal
libc++ build ignored-wand produced thousands of annotations); probes that intentionally call
JDK-removal APIs now carry@SuppressWarnings. - Test-fixture debug level. The
:testsSemAssert fixtures now always compile with full-g
(source,lines,vars), matching a user project's Gradle default; a narrowed level dropped the
LocalVariableTableand made captured-lambda identity undecidable.
Upgrading
remoldVersion/remold.versionis0.2.8ingradle.properties, theremold.gradle(.kts)
shims, both templates, and the Gradle-plugin examples. Both coordinate families are published for this
version:io.github.i-hope1.remold:*:0.2.8andcom.github.I-hope1.Remold:*:v0.2.8.- No configuration changes are required.
@HotswapInit(T4) remains design-only; use
@RemoldReinitfor field-level overrides. - The external IDE/JDWP redefine channel still performs a single-phase redefine (the JVM hands the
already-redefined class to the post-callback and provides no second-redefine trigger). This is the only
remaining read-through window and is tracked as a known residual indocs/status.mdrisk 9.
Verification
./gradlew check— 820 JUnit tests, 0 failed, 0 skipped;verifyLogLanguage,
verifyDocStatusMarkers, and:gradle-plugin:validatePluginsgreen.- Real DCEVM (JBR 21.0.9):
liveDcevmTest44/0;redefineDynamicNoBaselineProbe13/0. publishToMavenLocal+verifyReleaseCoordinates: all 8 modules under both coordinate families;
a scratch consumer resolved 16/16 coordinates frommavenLocal; both templates passhelp --offline.