fix(build): decouple doc generation from binary compilation#557
Open
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
Open
fix(build): decouple doc generation from binary compilation#557HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
Conversation
The build script chained gen:skill-docs && bun build --compile with &&, so a template error in gen:skill-docs would prevent browse binaries from being compiled. ./setup would report success but leave browse/dist/browse missing — every browse command fails with ENOENT. Split into build:docs and build:binaries. Use ; (not &&) in the top- level build command so binary compilation runs even if doc generation fails. Doc errors are still visible in output but no longer block the browse binary that users need. Fixes garrytan#482. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
buildintobuild:docsandbuild:binaries;so binary compilation runs even if doc generation failsProblem
After upgrading gstack,
browse/dist/browseis missing../setupreports "gstack ready" but every browse command fails with ENOENT.The
buildscript chains everything with&&:If
gen:skill-docsfails (missing Codex host config, template syntax error, stale resolver), the&&chain stops.bun build --compilenever runs. The trailing|| truemasks the exit code —./setupdoesn't detect the failure.Reproduction
./setupgen:skill-docs --host codexfails, entire build chain aborts./setupprints "gstack ready"$B goto https://example.com→zsh: no such file or directory: browse/dist/browseFix
;runsbuild:binariesregardless ofbuild:docsexit code. Doc generation errors still print to stderr but the browse binary that users need always gets compiled.+3/-1 in
package.json.Fixes #482.