From 6639b028f5605d30173338d6d336b43d4e539a5e Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 14 Jun 2023 18:25:59 +0000 Subject: [PATCH] feat: enable std.sha2 by default Upstream issue: https://github.com/google/go-jsonnet/pull/699 --- --- a/crates/jrsonnet-stdlib/Cargo.toml +++ b/crates/jrsonnet-stdlib/Cargo.toml @@ -16,8 +16,6 @@ legacy-this-file = [] # Add order preservation flag to some functions exp-preserve-order = ["jrsonnet-evaluator/exp-preserve-order"] -# Add nonstandard `std.sha256` function -exp-more-hashes = ["dep:sha2"] # Bigint type exp-bigint = ["num-bigint", "jrsonnet-evaluator/exp-bigint"] @@ -34,6 +32,8 @@ # std.md5 md5 = "0.7.0" +# std.sha256, std.sha512 +sha2 = "0.10.6" # std.base64 base64 = "0.21.0" # std.parseJson @@ -41,7 +41,6 @@ # std.parseYaml, custom library fork is used for C++/golang compatibility serde_yaml_with_quirks = "0.8.24" -sha2 = { version = "0.10.6", optional = true } num-bigint = { version = "0.4.3", optional = true } [build-dependencies] --- a/crates/jrsonnet-stdlib/src/lib.rs +++ b/crates/jrsonnet-stdlib/src/lib.rs @@ -114,7 +114,6 @@ ("set", builtin_set::INST), // Hash ("md5", builtin_md5::INST), - #[cfg(feature = "exp-more-hashes")] ("sha256", builtin_sha256::INST), // Encoding ("encodeUTF8", builtin_encode_utf8::INST), --- a/docs/features.md +++ b/docs/features.md @@ -154,6 +154,3 @@ } ``` -## `exp-more-hashes` - -Adds new standard library function: `std.sha256`, upstream issue: https://github.com/google/jsonnet/pull/607 -- gitstuff