Repository navigation
fix(validation): decode JSON payload from flutter --version --machine - #2053
Merged
Merged
Conversation
Owner
Author
|
Merged with |
Contributor
|
Chat app preview removed for |
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
buildValidationBundle'sflutter --version --machineprobe to decode only the JSON object starting at the first line whose leading horizontal-whitespace-trimmed character is{, skipping cold Windows SDK bootstrap pub output (Resolving dependencies..., etc.) while keeping exit-code, JSON-object, and SDK-pin checks intact.test/unit/tooling/validation_remote_test.dartcovering cold Windows bootstrap stdout, warm compact/pretty JSON, missing/malformed/trailing-junk JSON, nonzero exit codes, and Flutter/Dart pin mismatches.1c46ce9bc(Validation bundles / Desktop windows-2022): https://github.com/leehack/llamadart/actions/runs/44275471493/job/134702549877Validation bundles / Desktop windows-2022): https://github.com/leehack/llamadart/actions/runs/44334166893/job/134907964388Validation bundles / Desktop windows-2022): https://github.com/leehack/llamadart/actions/runs/44336005477/job/134915043891Production-readiness scope
tool/testing/validation/bundle.dart). No published library or consumer API changes.buildValidationBundle) on Windows, macOS, and Linux.flutter --version --machineexits, missing/malformed/trailing-junk JSON, and mismatched Flutter/Dart SDK pins continue to throwStateError/FormatExceptionbefore running harnessdart pub get.Completeness checklist
PR type guidance
flutter.batrunsdart pub upgrade --suppress-analyticswith stdout inherited beforeflutter_toolsprints the--version --machineJSON object, causingjsonObject(jsonDecodeon full stdout) to fail withFormatExceptionat character 1. Targeted regression and control tests added intest/unit/tooling/validation_remote_test.dart(flutter --version --machine probegroup).Test Plan
dart run tool/prepare_workspace.dartdart format --output=none --set-exit-if-changed .dart analyzedart run tool/testing/check_platform_boundaries.dartdart test -p vm -j 1 --exclude-tags local-only(Deferred to CI; ran fulltest/unit/tooling/suite locally.)dart test -p chrome --exclude-tags local-only(N/A:tool/testing/validation/is VM-only.)coverage-libmatrix row whenlib/behavior changes (N/A: nolib/changes.)TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/validation_remote_test.dart(+88 ~1),TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/(+1886 ~11), anddart run tool/testing/run_local_e2e.dart --scenario validation-harness --dry-run.Matrix Evidence
validation-harnessTMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/validation_remote_test.dart(+88 ~1);TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/(+1886 ~11);--dry-runinspected. HostedValidation bundles / Desktop windows-2022runs on PR CI.Review Notes
6744fcf1d3d0c7e4bea75300a06a9393f6ff2586(CI pending)High-risk regression review