Skip to content

Define or recommend YAML schema supported #3962

@mx-psi

Description

@mx-psi

Current spec wording says that:

YAML configuration files SHOULD follow YAML spec revision >= 1.2.

This leaves some ambiguity as YAML supports several 'schemas' (ways of interpreting the values that are not explicitly marked with a type tag). The YAML spec recommends the Core schema (although, IIUC, this recommendation is not normative).

To give a concrete example, in Go, the main YAML parsing libraries (1, 2), both support the YAML 1.1 0 leading octal syntax notation, where 0123 is equivalent to 0o123 or 83, while the YAML 1.2 core schema does not. If this is not the case in other languages, differences when interpreting integer literals could lead to hard-to-debug and unintuitive results.

The SDK configuration spec should recommend what YAML schema to use, and if possible explicitly define the recommended behavior with 0 leading integer literals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationRelated to configuring the SDKtriage:deciding:community-feedbackOpen to community discussion. If the community can provide sufficient reasoning, it may be accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions