Three slices of the 26.2 protocol port so far (tests/item.rs, and now tests/configuration.rs and tests/play_login.rs in #968) have each stood up the same Java harness to print real encoder bytes, and none of them is committed. The recipe is identical every time:
unzip -q "$JAR" 'META-INF/versions/*/server-*.jar' -d bundle
unzip -q "$JAR" 'META-INF/libraries/*' -d libs
CP="$(find bundle -name 'server-*.jar'):$(find libs -name '*.jar' | tr '\n' :)"
javac -cp "$CP" -d out Harness.java && java -cp "$CP:out" Harness
plus SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); at the top of main, without which the first touch of BuiltInRegistries throws IllegalArgumentException: Not bootstrapped.
Rediscovering that costs 15-30 minutes each time, and it means the vectors in the tests cannot be regenerated after a protocol bump without rewriting the harness.
Suggested fix: a minecraftHarness derivation in nix/minecraft-data.nix that assembles the classpath from the pinned jar, plus a committed Harness.java per test module (or one with a subcommand). nix run .#minecraft-vectors would then reprint every vector on demand, and a bump would show up as a diff in the printed hex rather than as silently stale fixtures.
Related: #964 (the decompiled set is too narrow for the same reason -- every slice re-runs cfr by hand).
Filed by Claude while implementing #968.
Three slices of the 26.2 protocol port so far (
tests/item.rs, and nowtests/configuration.rsandtests/play_login.rsin #968) have each stood up the same Java harness to print real encoder bytes, and none of them is committed. The recipe is identical every time:plus
SharedConstants.tryDetectVersion(); Bootstrap.bootStrap();at the top ofmain, without which the first touch ofBuiltInRegistriesthrowsIllegalArgumentException: Not bootstrapped.Rediscovering that costs 15-30 minutes each time, and it means the vectors in the tests cannot be regenerated after a protocol bump without rewriting the harness.
Suggested fix: a
minecraftHarnessderivation innix/minecraft-data.nixthat assembles the classpath from the pinned jar, plus a committedHarness.javaper test module (or one with a subcommand).nix run .#minecraft-vectorswould then reprint every vector on demand, and a bump would show up as a diff in the printed hex rather than as silently stale fixtures.Related: #964 (the decompiled set is too narrow for the same reason -- every slice re-runs cfr by hand).
Filed by Claude while implementing #968.