Skip to content

RFC Proposal: Directives belong to the stream and not a document #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

eemeli
Copy link
Member

@eemeli eemeli commented Jul 23, 2020

The YAML 1.1 spec defines a stream as consisting of a series of documents, each of which "may be preceded by a series of directives." Documents after the first (l-next-document) have this additional specification:

If the document specifies no directives, it is parsed using the same settings as the previous document. If the document does specify any directives, all directives of previous documents, if any, are ignored.

In the YAML 1.2 spec, a document in a stream "is completely independent from the rest". This version of the spec does not define an l-next-document construct, but does define an l-directive-document as starting "with some directives".

The complete independence of documents from each other severely limits the usability of multi-document streams, in particular with respect to directives. The YAML 1.1 implementation should be returned to, while clarifying the relationship between documents and directives.

@ingydotnet ingydotnet added the RFC Request For Comment label Jul 23, 2020
@eemeli eemeli mentioned this pull request Oct 5, 2020
14 tasks
@ingydotnet ingydotnet closed this May 2, 2021
@ingydotnet ingydotnet deleted the branch master May 2, 2021 21:48
@ingydotnet ingydotnet deleted the RFC-directives-are-stream branch May 3, 2021 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants