Repository navigation
feat: add --summary-stderr/--summary-file to varlock load, improve execSyncVarlock API - #681
Merged
Merged
Conversation
varlock
@varlock/cloudflare-integration
@varlock/expo-integration
@varlock/nextjs-integration
@varlock/vite-integration
commit: |
… improve execSyncVarlock API
Add `--summary-stderr` and `--summary-file` flags to `varlock load` so
integrations can get a human-readable redacted summary alongside
machine-readable JSON output. The summary flags are silently skipped
when `--format pretty` since stdout already contains the summary.
Add `fullResult` option to `execSyncVarlock` that returns `{ stdout, stderr }`
and throws `VarlockExecError` on failure, giving callers structured access
to both streams. The old string-return behavior is preserved by default
for backwards compatibility.
Migrate all integrations to use `fullResult: true` with explicit stderr
handling, replacing the old `showLogsOnError`/`exitOnError` options.
The hashFiles glob `swift/**` included .build/ artifacts on macOS runners, producing a different hash than clean Ubuntu checkouts — so cache restores never matched. Narrowed to Package.swift + Sources/** to stabilize the key. Also: trigger native builds when their workflow YAML changes, fall back to building when the cache misses (instead of failing), and use needs.*.result to decide artifact-vs-cache in release-preview.
Integrations should not show the summary by default — only surface errors on failure. The --summary-stderr flag is a CLI feature for users and the GitHub Action to opt into.
theoephraim
force-pushed
the
feat/load-summary-stderr
branch
from
May 1, 2026 21:44
5a67719 to
164d48f
Compare
Contributor
|
The changes in this PR will be included in the next version bump.
|
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
--summary-stderrand--summary-fileflags tovarlock loadso integrations can get a human-readable redacted summary alongside machine-readable JSON outputfullResultoption toexecSyncVarlockthat returns{ stdout, stderr }and throwsVarlockExecErroron failure — the old string-return behavior is preserved by defaultfullResult: truewith explicit stderr handling--format pretty(stdout already has the summary)Motivation
When integrations call
varlock load --format json-full, they get JSON on stdout but have no way to surface a human-readable summary to the developer. PreviouslyexecSyncVarlockdiscarded stderr on success entirely, and usedshowLogsOnError/exitOnErrorworkarounds for error display.Now integrations pass
--summary-stderrto get the pretty summary on stderr, and usefullResult: trueto access both streams with proper error typing viaVarlockExecError.Test plan