google / jsonnet

Jsonnet - The data templating language
http://jsonnet.org
Apache License 2.0
6.98k stars 440 forks source link

Not a templating language #1040

Closed malcolmholmes closed 1 year ago

malcolmholmes commented 1 year ago

The website describes Jsonnet as a "templating language". For a broader definition of "templating", this is correct. However, with templating tools such as Jinja or Helm around that treat structured data as flat text files, the term suggests that Jsonnet is less powerful than it is.

This suggestion arose from a conversation with a colleague who refused to use "another templating language". I'm suggesting this description harms Jsonnet, by limiting it.

Other possible descriptions:

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

sparkprime commented 1 year ago

I wonder if we should just use "configuration language" at this point. The term "data templating language" dates back to 2014 when we were discussing how to describe to the outside world (i.e. not Google) what Jsonnet is for, because we felt that configuration language (which is what it was called inside Google) would not be easily understood externally. But I feel that now, the term is much more widely used outside of Google.

malcolmholmes commented 1 year ago

"configuration language" works for me, just not "templating language"!!

Duologic commented 1 year ago

I've been using jsonnet for testing and validation too, does that fall under 'configuration' in your point of view?

sparkprime commented 1 year ago

Are you testing or validating configuration? :)

Duologic commented 1 year ago

Not necessarily, it could validate JSON output from an API call piped into jsonnet.

My point is that 'configuration language' is still quite restricting for how powerful Jsonnet can be. Rendering configuration is one of the main features, by putting that in the initial tagline it might rule out any other uses prematurely, just like 'templating'.

sparkprime commented 1 year ago

True, and I can see how a hermetic language would be a decent choice for testing / verification as well as configuration. Neither of those are really "rendering" either, though. Maybe we should single out configuration as the primary use case but also prominently draw attention to other use cases on the front page.

rhowe commented 1 year ago

since this is a config language

https://github.com/google/jsonnet/pull/607#issuecomment-467418904

:)