Repository navigation
fix(yaml): support multiline flow collections - #9700
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: d1562a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Yaml.parse handed only the first line of a flow collection to the flow parser, so a JSON-style mapping or sequence spanning lines failed with "Expected ':'". The flow parser now pulls continuation lines while inside a collection; they must be indented past the parent node, except a closing bracket at the parent's indentation. Multiline plain scalars inside flow collections are folded.
effect-bot
force-pushed
the
fix/yaml-flow-mappings
branch
from
October 21, 2026 20:34
fe32fc6 to
0201939
Compare
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
Yaml.parsefailed on moby's Docker Engine API document withSyntaxError: Expected ':' at flow offset 1. The cause is a JSON-style flow mapping split across lines:The parser handed only the first line of a flow collection to the flow parser. Now the flow parser pulls in continuation lines while it is inside a collection:
yamland libyaml accept it. The module doc states this difference.Tests
The existing tests are unchanged. A new
multiline flow collectionsblock covers the moby shape, a closing bracket at the parent's indentation, nested collections, a sibling key after the collection, comment and blank lines, and plain-scalar folding. It also checks that three inputs are rejected: a continuation line at the parent's indentation, an unterminated collection before a sibling key, and content after the closing bracket.Merge Danger
Door: two-way
Parser-only change behind the existing
parsesignature.Blast Radius: additive
Only input that used to fail now parses. Valid single-line input is unaffected.
Closes EFF-2728