mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-28 07:56:11 +00:00
docs: record characterization backfill
This commit is contained in:
1 parent
122604bd5a
commit
2e511a21e3
2 files changed
+31
-4
No files matched your search
@@ -1346,3 +1346,16 @@ generated-trait compatibility work. Scala-runtime removal remains a later projec
|
||||
closures are replaced by one Java helper, reducing the packaged inventory from 455 to 452 classes and leaving 206
|
||||
Java files plus 9 Scala files / 1,883 nonblank Scala lines. No new compatibility divergence needs a ledger entry.
|
||||
`multipart/asm/StackAnalyser.scala` is the next bounded target; keep its control flow and nested model separable.
|
||||
- Backfilled, on request, the characterization tests the six ports from `b45527e` to `8581d30` had skipped. Six new
|
||||
suites in `src/test/java/codechicken/multipart/asm/` add 32 plain-JVM tests, taking that suite from 276 to 308.
|
||||
`ByteCodeReader` and the signature parser are covered by behavior; `ScalaSigReader` by round trips, annotation
|
||||
lookup and its replaced-value result. `DebugPrinter`, `ASMMixinFactory` and `MultipartMixinFactory` initialize
|
||||
through Forge, so those tests pin public surfaces, fields and bytecode constants and calls, leaving generated
|
||||
tiles, pass-through delegation and Java-trait `copyFrom` to the Forge suite.
|
||||
- Ran the backfill against `src/main` restored from `1faf0dd`: it compiles against the untouched Scala and 45 of 46
|
||||
tests pass. The only failure is `MultipartMixinFactory`'s facade method set, which is the four additive static
|
||||
forwarders already in the ledger. Two assertions were relaxed to hold on both trees: the facade private
|
||||
constructors Scala never emitted, and the `DebugPrinter$` directory cleanup Scala emitted as a closure class.
|
||||
- Two behaviors were pinned that inspection had not recorded. `ScalaSigReader.encode` drops the final 7-bit group, so
|
||||
a decode round trip is exact only when that group is empty; a payload ending in a high-bit byte does not survive
|
||||
it. `ScalaSignature.evalS` throws `MatchError` on an unknown tag while `eval` returns the table entry unchanged.
|
||||
@@ -24,9 +24,9 @@ must link; the source-level audit is the authority on behavior, serialized data,
|
||||
|
||||
Followed for every port so far. It has caught three real ABI breaks that inspection missed.
|
||||
|
||||
**Current user instruction: do not add tests unless requested.** The characterization-first workflow below describes
|
||||
the prior approach, not permission to add tests. Without that request, save a pre-port reference jar and use the
|
||||
existing suites plus ABI/output comparisons, as for `DebugPrinter`.
|
||||
**Tests are added only when requested.** The six ASM ports from `b45527e` to `8581d30` were made under that
|
||||
instruction, verified with ABI, disassembly and dump comparisons instead; their characterization tests were
|
||||
backfilled afterwards on request. Ask before skipping step 1 again, and record which check replaced it.
|
||||
|
||||
1. **Characterize first, commit separately.** Write tests against the untouched Scala and confirm they pass. Commit as
|
||||
`test: characterize X` before touching the implementation.
|
||||
@@ -72,7 +72,7 @@ awk -F'"' '/<testsuite /{t+=$4;f+=$8;e+=$10} END{print "tests="t" failures="f" e
|
||||
grep -o 'tests="[0-9]*" skipped="[0-9]*" failures="[0-9]*" errors="[0-9]*"' run/server/junit-out/TEST-*.xml
|
||||
```
|
||||
|
||||
Current baseline: **276 plain-JVM tests and 116 Java 8 Forge dedicated-server tests passing.** The ignored local server
|
||||
Current baseline: **308 plain-JVM tests and 116 Java 8 Forge dedicated-server tests passing.** The ignored local server
|
||||
EULA is accepted in this checkout. GitHub Actions runs the same self-validating Forge suite in a dependent job after
|
||||
the shared GTNH build; keep both jobs required.
|
||||
|
||||
@@ -608,6 +608,20 @@ together, and Java misreads the outer parameter in five Scala 2.11 generic inner
|
||||
branches also remain in Scala. Moving the model needs an explicit bytecode-bridge strategy; do not lose those methods
|
||||
or outer-instance bindings merely to reduce the Scala count.
|
||||
|
||||
The six ports above now have backfilled characterization tests in `src/test/java/codechicken/multipart/asm/`.
|
||||
`ByteCodeReader` and the signature parser are covered by behavior: section-relative reads, `readNat`/`readLong`
|
||||
decoding and overflow, clamped string reads, the `advance` bounds failure, table decoding of the frozen
|
||||
`ReferenceScalaEdgePart` fixture, symbol and method-descriptor evaluation, `SigEntry.delete`, and a synthetic table
|
||||
for the literal and unknown-tag branches. `ScalaSigReader` is covered by round trips, the lossy trailing group,
|
||||
annotation lookup and `write`'s previous-value result. `DebugPrinter`, `ASMMixinFactory` and `MultipartMixinFactory`
|
||||
reach Forge from their initializers, so those tests assert public surfaces, fields, and bytecode constants and calls;
|
||||
generated tiles, pass-through delegation and Java-trait `copyFrom` stay covered by the Forge suite.
|
||||
|
||||
Run against `src/main` restored from `1faf0dd`, the backfill compiles and passes 45 of its 46 tests. The one failure
|
||||
is `MultipartMixinFactory`'s facade method set, which is the ledger's four additive static forwarders. Two assertions
|
||||
were relaxed to hold on both trees: the facade private constructors Scala never emitted, and `DebugPrinter$`'s
|
||||
directory cleanup, which Scala emitted as a separate closure class.
|
||||
|
||||
**Next: `multipart/asm/StackAnalyser.scala`.** Treat its analyser control flow and nested model separately if the same
|
||||
Java-source limitations appear. Preserve every nested binary name, constructor, outer/implicit instruction binding,
|
||||
case-class surface, mutable Scala collection descriptor and the current opcode behavior (including its existing
|
||||
|
||||
Reference in new issue
Block a user