google / go-jsonnet

Apache License 2.0
1.63k stars 235 forks source link

Expose "unparse", FormatNode and RawAST #710

Closed charleskorn closed 1 year ago

charleskorn commented 1 year ago

This is a rebased version of #530 by @tomwilkie:

(Opening this for discussion, see https://github.com/google/go-jsonnet/issues/389)

I've build a little tool that does some modifications to jsonnet files (updating docker image versions in them), and wanted to use the pretty-printing code to write out the modified AST.

This is a minimal set of changes that allow me to do that.

sparkprime commented 1 year ago

This does not produce any go_sdk headers files failure I've seen before. I think I fixed it by bumping the version of the bazel/golang integration package that we use.

sparkprime commented 1 year ago

I would merge this without worrying about the failing bazel test though... That can be fixed independently.

coveralls commented 1 year ago

Coverage Status

coverage: 68.568%. remained the same when pulling 3ed30fbb6bc458248065027fe81c3771e56b5606 on charleskorn:expose-unparse into 9639773cf0f59779e7ede78c729fe7e8b13dc796 on google:master.