fix: activate-only runs failed build-output validation - #86
Merged
Conversation
Fifth bug in the unity-activate#111 chain. Docker.run() unconditionally called UnityBuildValidation.validateBuild() for the unity engine, which requires a "# Build results #" section - something only a real build ever produces. Every successful activate-only run (activateOnly: true) threw "There was an error building the project" right after "Activation complete." printed, because there was never a build to validate. Now skipped when activateOnly is set.
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth bug in the same chain as #79/#81/#82/#84, found by re-running unity-activate#111's CI against v0.1.6.
The bug
Docker.run()unconditionally callsUnityBuildValidation.validateBuild(dockerRun.output)for theunityengine. That method requires a# Build results #section in the output — something only a realbuildever produces — and throwsThere was an error building the projectif it's missing.Every
activate-only run (activateOnly: true) hit this, right after activation itself genuinely succeeded:There's nothing to validate —
activatenever builds anything.The fix
Skip
validateBuildwhenoptions.activateOnlyis set.How I found it
v0.1.6 (with #84) got unity-activate#111 past the last silent-failure bug (System.run swallowing a successful run). This is what showed up immediately after — activation itself worked, the CLI just failed it anyway afterward.
Testing
docker.test.ts:validateBuildis skipped foractivateOnly: true, still runs for real builds.bun run test— 153 pass, 3 skip, 0 fail.🤖 Generated with Claude Code