Commits
Tarun Sukhani authored 534462d3b7a
test: cover the play shim's directory check; explain pnpm probe failures Two loose ends from the shim fix and the SPA work. play shim regression test (framework/test-src/play/PlayShimTest.java) The shim had no tests at all. This one drives the real script through ProcessBuilder, the way BundleLauncherTest drives the bundle launcher, and covers find_gradle's directory handling: refusing outside an application, naming an application sitting directly below, staying quiet when there is no such neighbour, still delegating inside a genuine Gradle build, and leaving play new alone. Every case puts a stub gradle on PATH, which is the point rather than a convenience. The bug guarded here -- falling through to a system Gradle from a non-application directory, so the shim's own guidance never printed -- only reproduces when a system Gradle exists to fall through to. A suite that relied on the host not having one would pass against the broken shim on most machines. The stub also decouples the assertions from whatever real Gradle is installed. Verified by reverting the fix: 3 of the 5 fail, and they are the three asserting the new behaviour. The other two pass either way by design -- they guard against over-correction, not for the fix. It lives in the framework suite rather than beside BundleLauncherTest because the shim is a repo-root file ant package bundles, not a gradle-plugin resource; putting it in the plugin build would reach across a boundary for a file that build does not own. playFrontendSpa's pnpm probe The probe caught every exception and always reported "pnpm not found on PATH". The common failure is not a missing pnpm: a Gradle daemon keeps the environment of the client that started it, so a daemon started before pnpm reached PATH goes on failing while the developer's shell resolves it fine. That message sends people hunting an installation problem they do not have -- it cost time twice in one session. It now reports the underlying cause, names ./gradlew --stop, and prints the PATH the build actually sees, which makes the mismatch self-evident. FrontendSpaTaskTest asserts the new shape, but only when the probe is the branch that fired: which of the two failures happens depends on whether the machine has pnpm on PATH, and a test that only passes on machines without it would be worse than none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JTvjeSmGVe7RFyx8ZJXRAx