feat: add Minecraft 26.1.2 spigot support with auto beta-tag workflow#23
feat: add Minecraft 26.1.2 spigot support with auto beta-tag workflow#23clawd131662[bot] wants to merge 3 commits into
Conversation
Review Summary整體方向 OK,跑得起來(自動發 release 已經到 已修好的部分
建議在 merge 前處理(功能性)
建議改善(非阻擋)
沒有 blocking 的問題
LGTM once (1) the |
Blocking points called out in review of #23: - BukkitVersionHelperSpigot26_1_2.getBiomeReg() had the same broken-double-checked-locking shape as initReflection / initCraftBukkitClasses (race between `if (biomeRegistry == null)` and the static field assignments). Add `synchronized` so all three reach callers with consistent state. - Drop the bogus `org.bukkit.craftbukkit.v1_21_R7` Spigot fallback in both initCraftBukkitClasses and MapChunkCache26_1_2.initReflection. The package name was a guess and a wrong fallback would mask a real ClassNotFoundException with a misleading "fell through to Spigot" path. If/when a Spigot-versioned helper is needed, add it after confirming the package against an actual Spigot 26.1.2 build. - Remove the now-unused craftServerClass / craftServerGetServer fields from BukkitVersionHelperSpigot26_1_2 (they were looked up but never invoked; the helper that does need them lives in MapChunkCache26_1_2). Non-blocking polish from the same review: - spigot/build.gradle: expand the comment around the `configuration: 'default'` workaround so future maintainers don't "align" the entry back to the sibling helper modules' style and break the build. - bukkit-helper-26-1-2/build.gradle: add a FIXME marker for the toolchain-25 + `--release 21` + JVM-25-attribute dance. It only exists because Shadow runs on JDK 21; revisit once Shadow handles major-69 class files. - spigot/Helper.java: warn that the `(MC: 26.` branch is a prefix match, so future per-MC helpers must be added above this line. - .github/workflows/auto-tag-beta.yml: derive the beta base (e.g. "26.1.2-beta") from build.gradle's existing version line so a future MC bump only needs editing build.gradle, not three places in the workflow. Document that all `claude/**` branches share a single tag namespace via the global concurrency group.
|
Thanks for the thorough review. Pushed 2cf6199 addressing everything. Blocking
Non-blocking
The |
Review Summary (round 3)
Blocking 部分(已修)
非阻擋的 polish(已修)
還可以再改進,但完全可以 follow-up
LGTM 👍 這版可以合了,剩下兩點如果想處理就 follow-up,不處理也沒關係。 |
Round-3 review nit from #23: ${BASE} (e.g. "26.1.2-beta") was spliced straight into sed's regex; the literal `.`s would match any character and let stray tags like `26X1X2-beta.5` be picked up by `LAST=$(...)`. Pass BASE through a one-shot escape before using it in the regex. Verified locally that `26X1X2-beta.5` is no longer matched while real tags `26.1.2-beta.5` / `26.1.2-beta.10` still are.
|
LGTM 收到,謝謝 :) 順手把第一個 follow-up 收掉了:
第二個( |
Review Summary (round 4)
跳脫字元集 剩下唯一未做的 follow-up( 可以合了 ✅ |
- Add bukkit-helper-26-1-2 (cloned from bukkit-helper-121-11), pointing at the Paper dev bundle 26.1.2.build.57-stable. Source uses Mojang- mapped NMS imports and resolves CraftBukkit classes via reflection at runtime; getBiomeReg / initReflection / initCraftBukkitClasses are synchronized to avoid the broken-double-checked-locking race that the 121-x helpers historically had. - Bump io.papermc.paperweight.userdev to 2.0.0-beta.21 (required for paperweight 'data version 8' dev bundles -- beta.19 rejects 26.1.2 at setup time) and add org.gradle.toolchains.foojay-resolver-convention 1.0.0 so the JDK 25 toolchain Paper 26.1+ requires gets auto- provisioned by Gradle. - Compile bukkit-helper-26-1-2 with the JDK 25 toolchain but emit Java 21 bytecode via options.release = 21 (so the Shadow plugin running on JDK 21 can read its class files), while pinning the org.gradle.jvm.version resolution attribute to 25 so the Java-25-only paper-api still resolves. Drop reobfJar (Paper 26.1+ ships Mojang- mapped only, no reobf mappings) and have spigot consume this module via configuration: 'default' to bypass paperweight's now-empty reobf variant. - Wire the new helper into spigot/build.gradle and dispatch every (MC: 26.x) server in spigot/.../Helper.java to it. Bump the project version to 26.1.2-beta.1. - Add .github/workflows/auto-tag-beta.yml: every push to a claude/** branch derives the beta base from build.gradle (regex metachars escaped), computes the next <base>.N, syncs build.gradle, commits the bump back with [skip ci], builds the spigot jar with the JDK 25 toolchain and publishes a GitHub Release with the jar attached. Concurrency is serialized across branches so simultaneous pushes don't race for the same tag. The workflow does NOT create PRs; that is done out-of-band by an operator with pull_requests:write. - Migrate release.yml off the deprecated actions/upload-release-asset@v1 to gh release upload --clobber (built into the GitHub Actions runner, supports re-runs without 'asset already exists' failures).
293f63a to
319ae70
Compare
Summary
bukkit-helper-26-1-2(cloned frombukkit-helper-121-11), pointing at the Paper dev bundle26.1.2.build.57-stable. Replaces the removedBlockState#getLightBlock()call with the renamedgetLightDampening()introduced in MC 26.1.io.papermc.paperweight.userdevto2.0.0-beta.21(required for paperweightdata version 8dev bundles) and addsorg.gradle.toolchains.foojay-resolver-convention 1.0.0so the JDK 25 toolchain Paper 26.1+ requires is auto-provisioned by Gradle.spigot/build.gradleand routes every(MC: 26.x)server inspigot/.../Helper.javato it. Bumps the project version to26.1.2-beta.1.options.release = 21(so the Shadow plugin running on JDK 21 can read its class files), while pinning theorg.gradle.jvm.versionresolution attribute to 25 so the Java-25-onlypaper-apistill resolves. Spigot consumes this module via thedefaultconfiguration to bypass paperweight's emptyreobfvariant (Paper 26.1+ ships Mojang-mapped only).MapChunkCache26_1_2.initReflection()andBukkitVersionHelperSpigot26_1_2.initCraftBukkitClasses()to fix a lazy-init race where one render thread observedinitialized==truewhile another was still populating the staticMethodfields, surfacing asNullPointerExceptiononcraftWorldGetHandle.invoke()..github/workflows/auto-tag-beta.yml: every push to aclaude/**branch computes the next26.1.2-beta.N, syncsbuild.gradle, commits the bump back with[skip ci], builds the spigot jar with the JDK 25 toolchain and publishes a GitHub Release with the jar attached. Concurrency is serialized across branches (group: auto-tag-beta) so simultaneous pushes don't race for the same tag. The workflow does NOT create PRs; that is done out-of-band by an operator withpull_requests:write.release.ymloff the deprecatedactions/upload-release-asset@v1and usesgh release upload --clobberinstead.Verification
./gradlew :spigot:buildsucceeds locally and producestarget/Dynmap-26.1.2-beta.N-spigot.jar(Java 25 toolchain auto-fetched via foojay).26.1.2-beta.1onwards with the spigot jar attached.Test plan
26.1.2-beta.2,.3, ...