Skip to content

Sjsonnet is more lenient than google/jsonnet in calling 0-argument function values during materialization #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lihaoyi-databricks opened this issue May 19, 2023 · 0 comments · Fixed by #233

Comments

@lihaoyi-databricks
Copy link
Contributor

lihaoyi-databricks commented May 19, 2023

Input:

{
  foo(): 123
}

google/jsonnet output:

Error: RUNTIME ERROR: couldn't manifest function as JSON
	Field "foo"	
	During manifestation	

Sjsonnet output:

{
  "foo": 123
}

It appears that google/jsonnet will only auto-evaluate a function during materialization if it's at the top level, whereas sjsonnet will auto-evaluate it anywhere in the jsonnet document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant