Skip to content
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

Object asserts not run by std.objectFieldsEx and std.objectHasEx #185

Open
sparkprime opened this issue May 18, 2016 · 1 comment
Open
Labels

Comments

@sparkprime
Copy link
Member

sparkprime commented May 18, 2016

$ jsonnet -e '{} == {assert false}'
true
@sparkprime
Copy link
Member Author

Decided that std.type, std.length, and all other reflection calls should not check asserts, since they check the set of fields, which are either static, or computed before object creation time.

However {} == { assert false } is strange, also std.manifestJson({ assert false }) == '{}' which is also strange.

This can be addressed by adding a native function to evaluate the assertions, and using it in the implementation of == (which is in Jsonnet) and manifestJson.

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

No branches or pull requests

1 participant