Skip to content

dhall-to-yaml-ng quotes the keys that contain a dash while dhall-to-yaml does not #1873

Open
@PierreR

Description

@PierreR

I don't quite understand why this simple file:
Given this command:

→ dhall-to-yaml-ng --file openshift/examples/test.dhall --output openshift/examples/test.yaml

Using this input file:

let k8s =
      https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/1.17/package.dhall sha256:7150ac4309a091740321a3a3582e7695ee4b81732ce8f1ed1691c1c52791daa1

in  k8s.Namespace::{
    , metadata = k8s.ObjectMeta::{
      , name = Some "test"
      , annotations = Some
          ( toMap
              { `openshift.io/display-name` = "A very long name"
              , `openshift.io/requester` = "test"
              }
          )
      }
    }

I will get this output yaml file:

apiVersion: v1
kind: Namespace
metadata:
  annotations:
    "openshift.io/display-name": A very long name
    openshift.io/requester: test
  name: test

I can't really make sense of the dichotomy of the two annotations.

If I use dhall-to-yaml I have this output file

apiVersion: v1
kind: Namespace
metadata:
  annotations:
    openshift.io/display-name: A very long name
    openshift.io/requester: test
  name: test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions