Skip to content

Commit f10dc84

Browse files
FeodorFitsnerclaude
andcommitted
ci(resolve-python-vars): surface dart run stdout+stderr for diagnosis
Last CI run failed with "did not return values for SERIOUS_PYTHON_VERSION=3.12" but the composite action's debug `echo "$json"` printed nothing — couldn't tell from the log whether `dart run` errored silently or returned non-JSON. Capture stdout+stderr into a single var, print it verbatim before piping through sed/jq, and let `flutter pub get` print its own progress (was previously >/dev/null). Once we see the actual output we can decide if this is a Dart precompile hiccup, a package_config issue, or something else. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e9611ab commit f10dc84

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/actions/resolve-python-vars/action.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,20 @@ runs:
2424
echo "::error::SERIOUS_PYTHON_VERSION is not set in env."
2525
exit 1
2626
fi
27-
flutter pub get >/dev/null
28-
# `dart run` writes "Building package executable..." to stdout on a
29-
# cold cache, ahead of our JSON. Strip everything before the opening
30-
# `{` so `jq` sees only the document.
31-
json=$(dart run serious_python:main version --json | sed -n '/^{/,$p')
32-
full=$(echo "$json" | jq -r ".python_releases.\"${SERIOUS_PYTHON_VERSION}\".standalone_version")
33-
date=$(echo "$json" | jq -r ".python_releases.\"${SERIOUS_PYTHON_VERSION}\".python_build_release_date")
27+
flutter pub get
28+
# Capture stdout+stderr of `dart run` so any failure prose is visible
29+
# for diagnosis. `dart run` writes "Building package executable..." to
30+
# stdout on a cold cache ahead of our JSON; strip everything before
31+
# the opening `{` so `jq` sees only the document.
32+
raw=$(dart run serious_python:main version --json 2>&1)
33+
printf '%s\n' "--- raw output from dart run ---"
34+
printf '%s\n' "$raw"
35+
printf '%s\n' "--- end raw output ---"
36+
json=$(printf '%s\n' "$raw" | sed -n '/^{/,$p')
37+
full=$(printf '%s\n' "$json" | jq -r ".python_releases.\"${SERIOUS_PYTHON_VERSION}\".standalone_version")
38+
date=$(printf '%s\n' "$json" | jq -r ".python_releases.\"${SERIOUS_PYTHON_VERSION}\".python_build_release_date")
3439
if [[ -z "$full" || "$full" == "null" || -z "$date" || "$date" == "null" ]]; then
3540
echo "::error::serious_python:main version --json did not return values for SERIOUS_PYTHON_VERSION=${SERIOUS_PYTHON_VERSION}"
36-
echo "$json"
3741
exit 1
3842
fi
3943
echo "SERIOUS_PYTHON_FULL_VERSION=$full" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)