"fn deploy" deletes comments from the func file
Problem
fn deploy deletes comments from the func file.
Steps to reproduce
Assume that you have comments in func file:
name: func
version: 0.0.1
runtime: go
type: async
memory: 64
format: json
timeout: 10
path: /submit
config:
## this is A
A: "A"
## this is B
B: "B"
then call the deploy:
$ fn -v deploy --registry `whoami`
Problem area
Comments will go away. This happens because CLI basically rewrites the func file.
Use cases
There are few valid use cases that i can foresee like:
- "comment temporarily the config var, call the deploy"
- "in comments i want to put the env vars description"
maybe something else there?
+1 . i think we should honor comments.
Would probably need to put version somewhere else.
@treeder maybe, the only thing we need to change is the version, however, removed comments appeared to be a known issue: https://github.com/go-yaml/yaml/pull/219 and it's not going to be resolved soon =/
I mean that we wouldn't touch the func.yaml file so the comments would stay where they are.