chore(build): migrate the repo onto the published 0.3.5 plugin — drop the #194 workaround - #205
Conversation
…workaround gone)
Bump the three consumed plugin pins 0.3.4 -> 0.3.5 (root settings.gradle.kts,
samples/minimal, samples/multiproject/bindings) and DELETE the root
build.gradle.kts `id("com.monkopedia.kplusplus.compiler") apply false` entry.
That entry was the #194 workaround: it forced the plugin onto the ROOT
buildscript classpath so it shared one classloader with KGP, because 0.3.4
carried its ksrpc/ktor/coroutines runtime as ordinary dependencies. 0.3.5 shades
that runtime into the plugin jar, so the workaround is no longer needed — and
this repo, whose :krapper self-hosts through the plugin, is the real multi-project
case the synthetic samples/multiproject canary only approximates.
Verified: :krapper:kplusplusSync and :featuregen:kplusplusSync are both green
with the workaround removed, and both outputs are BYTE-IDENTICAL to the
pre-migration baseline on 0.3.4.
|
Reviewing at Early checkpoint (central checks 1/2/5), before the full gate:
Continuing with the counterfactual, the full gate (nativeTest×3, apiCheck, ktlintCheck |
|
Full gate complete. Reviewed: Central checks (all pass)
Also
No defects found. This is real verification, not incidental — the counterfactual confirms the |
Post-release migration onto the freshly published 0.3.5 plugin. One coherent change: the
three consumed pins move together and the #194 root-buildscript workaround goes away, because
0.3.5 is the release that makes the workaround unnecessary.
What changed
settings.gradle.kts,samples/minimal/build.gradle.kts,samples/multiproject/bindings/build.gradle.kts.build.gradle.ktsworkaround — theid("com.monkopedia.kplusplus.compiler") apply falseentry (added chore(build): self-host on the published 0.3.4 plugin — drop the #184/#187 sync bridges #193, rewritten fix(plugin): shade the plugin's ksrpc/ktor/coroutines runtime into the jar (#194) #200). Itforced the plugin onto the ROOT buildscript classpath so it shared one classloader with KGP;
0.3.5 shades the plugin's ksrpc/ktor/coroutines runtime into the jar (fix(plugin): shade the plugin's ksrpc/ktor/coroutines runtime into the jar (#194) #200), which is the real
fix. The root
plugins { }block is now back to exactly its pre-chore(build): self-host on the published 0.3.4 plugin — drop the #184/#187 sync bridges #193 shape.docs/getting-started.mdpin bumped and its 0.3.4: NoSuchMethodError in multi-project consumers — plugin classloader shadows coroutines to 1.8.0 #194 note re-tensed (0.3.5 shadesit; the
apply falsetrick is now only advice for anyone stuck on 0.3.4).samples/multiproject/README.md— with the pin at a released version and an emptymavenLocal, the canary now can run against the released plugin (a useful post-releasecheck), so the "it cannot run against the released plugin" line is no longer true and was
dropped.
samples/multiproject/settings.gradle.kts("the shape that shipped broken in 0.3.4"),
samples/multiproject/README.md's "why it exists",.github/workflows/samples-minimal.yml,docs/design/live-service.md, and the "0.3.4 prepforgot to bump" notes in
compiler/.The workaround removal is the real test — and it passes
This repo is the genuine multi-project case that
samples/multiprojectonly approximates::krapperself-hosts through the plugin, from a subproject, with KGP at the root. With theworkaround deleted and pins at 0.3.5:
:krapper:kplusplusSync— green. NoNoSuchMethodError: Job.invokeOnCompletion$default.The shading fixed the real case, not just the synthetic canary.
:featuregen:kplusplusSync— green.Byte-identity
Baseline captured on
5cb4584(pinned 0.3.4, workaround present) before any edit, thenre-run after:
featuregen/build/krapped-cpp(148 files)krapper/build/krapped-cpp(131 files)diff -rclean in both directions. The 0.3.5 bundledkrappergenerates exactly what 0.3.4's did.Fresh checkout
~/.gradle/kplusplus/tools/0.3.5/was deleted, then a cleangit cloneof this branch builtfrom empty:
~/.m2/repository/com/monkopedia/kplusplus/contains no 0.3.4 or 0.3.5 — only stale 0.3.0–0.3.2 that nothing references — so nothing
local could have masked the real published artifact).
~/.gradle/kplusplus/tools/**0.3.5**/krapper(22 MB) was newly created.0.3.4/'s mtime isuntouched, so the new pin is not reusing the old tool — the
PLUGIN_VERSIONcache key generatedby No guard against a partial version bump (version lives in 6 places) #192 is doing its job.
:krapper:kplusplusSyncgreen; output byte-identical to the baseline apart from the two absolute-I/libraryPathslines inkrapper.def, which encode the checkout path. 0 other differing files.:krapper:nativeTest304/0 from the clean clone.Full gate
:krapper:nativeTest:featuregen:nativeTest:cppfixture:nativeTest:krapper:noncopyableDeterminismCheck-p compiler build(incl.apiCheck):kplusplus-compiler-gradle:verifyConsumedPluginPins--rerun-tasksto be surektlintCheck --rerun-taskssamples/minimal:nativeTestsamples/multiproject:bindings:buildNotes
verifyConsumedPluginPins(fix(build): generate PLUGIN_VERSION from the project version — one source of truth (#192) #202) was only ever exercised in the lagging phase. Confirmed herethat its "not ahead" comparison passes on equality, which is the state the repo now sits in
between this migration and the next release prep. No change needed.
warnings, no resolution oddities. The shading is invisible from the consumer side, which is the
intended outcome.