Closed taylormonacelli closed 6 months ago
This fails:
kcl --version cat >config.yaml <<EOF # ---------------------------------- Cluster ----------------------------------- cluster.name: my-application EOF kcl import --force config.yaml
With this error:
root@ip-172-31-19-201:~# kcl --version kcl version 0.9.0-alpha.1 root@ip-172-31-19-201:~# cat >config.yaml <<EOF > # ---------------------------------- Cluster ----------------------------------- > cluster.name: my-application > EOF root@ip-172-31-19-201:~# root@ip-172-31-19-201:~# kcl import --force config.yaml [1:1] sequence was used where mapping is expected > 1 | - Cluster ^ root@ip-172-31-19-201:~#
This fails
kcl --version cat >config.yaml <<EOF # ---- cluster.name: my-application EOF kcl import --force config.yaml
with the same error.
This works as expected:
kcl --version cat >config.yaml <<EOF # --- cluster.name: my-application EOF kcl import --force config.yaml cat config.k
root@ip-172-31-19-201:~# kcl --version kcl version 0.9.0-alpha.1 root@ip-172-31-19-201:~# cat >config.yaml <<EOF > # --- > cluster.name: my-application > EOF root@ip-172-31-19-201:~# root@ip-172-31-19-201:~# kcl import --force config.yaml root@ip-172-31-19-201:~# cat config.k """ This file was generated by the KCL auto-gen tool. DO NOT EDIT. Editing this file might prove futile when you re-run the KCL auto-gen generate command. """ { "cluster.name" = "my-application" } root@ip-172-31-19-201:~#
I expect anything starting with # should be treated as comment.
Parse error for line that is a comment.
root@ip-172-31-19-201:~# kcl --version kcl version 0.9.0-alpha.1 root@ip-172-31-19-201:~#
Thanks for the feedback, I've fixed it in https://github.com/kcl-lang/kcl-go/pull/310
Bug Report
1. Minimal reproduce step (Required)
This fails:
With this error:
This fails
with the same error.
This works as expected:
2. What did you expect to see? (Required)
I expect anything starting with # should be treated as comment.
3. What did you see instead (Required)
Parse error for line that is a comment.
4. What is your KCL components version? (Required)