diff --git a/Cargo.lock b/Cargo.lock index 1c82eeb9..dfed3915 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -925,7 +925,7 @@ dependencies = [ [[package]] name = "ergo" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "atty", "backtrace", @@ -966,7 +966,7 @@ dependencies = [ [[package]] name = "ergo_runtime" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "abi_stable", "abi_stable_ext", @@ -987,7 +987,7 @@ dependencies = [ [[package]] name = "ergo_runtime_macro" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "proc-macro2", "quote", @@ -996,7 +996,7 @@ dependencies = [ [[package]] name = "ergo_script" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "ergo_runtime", "futures 0.3.18", @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "ergo_std" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "abi_stable", "atty", diff --git a/ergo/Cargo.toml b/ergo/Cargo.toml index 8d93e35f..e62eeaf8 100644 --- a/ergo/Cargo.toml +++ b/ergo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ergo" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["Alex Franchuk "] edition = "2021" diff --git a/ergo/ChangeLog.md b/ergo/ChangeLog.md index 294f2924..e76d9d96 100644 --- a/ergo/ChangeLog.md +++ b/ergo/ChangeLog.md @@ -1,5 +1,10 @@ # ergo changelog +## 1.0.0-rc.3 -- 2021-12-14 +* Properly remove previously-set keys when a key is set to `unset`. + * With the recent modification to how unset values are removed this case was + missed. + ## 1.0.0-rc.2 -- 2021-12-13 * Remove `Unset` keyed arguments to commands just like they are removed from maps. diff --git a/ergo/README.md b/ergo/README.md index a2111489..44cd962d 100644 --- a/ergo/README.md +++ b/ergo/README.md @@ -94,3 +94,4 @@ scripts reside. * Maybe don't have a fallback doc string if there is no documentation set. * Progress spinner * Improve sources of capture bindings. +* `std:Iter:partition` diff --git a/ergo_runtime/Cargo.toml b/ergo_runtime/Cargo.toml index 6c3423e8..7b632956 100644 --- a/ergo_runtime/Cargo.toml +++ b/ergo_runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ergo_runtime" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["Alex Franchuk "] edition = "2021" diff --git a/ergo_runtime_macro/Cargo.toml b/ergo_runtime_macro/Cargo.toml index 5cf70c0a..2fc558c0 100644 --- a/ergo_runtime_macro/Cargo.toml +++ b/ergo_runtime_macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ergo_runtime_macro" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["Alex Franchuk "] edition = "2021" diff --git a/ergo_script/Cargo.toml b/ergo_script/Cargo.toml index 5215b4b8..c2c296f5 100644 --- a/ergo_script/Cargo.toml +++ b/ergo_script/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ergo_script" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["Alex Franchuk "] edition = "2021" diff --git a/ergo_script/src/eval.rs b/ergo_script/src/eval.rs index fecfdf99..d39ea5e7 100644 --- a/ergo_script/src/eval.rs +++ b/ergo_script/src/eval.rs @@ -481,6 +481,8 @@ impl Evaluator { if !v.is_type::() { env.insert(k, v.clone()); + } else { + env.remove(&k); } if let Some(cap) = cap { captures.resolve(cap, v); diff --git a/ergo_script/src/lib.rs b/ergo_script/src/lib.rs index 7807694c..f3ddfaa2 100644 --- a/ergo_script/src/lib.rs +++ b/ergo_script/src/lib.rs @@ -475,6 +475,16 @@ mod test { ) } + #[test] + fn set_and_unset() -> Result<(), String> { + script_eval_to("{a = 1, a = :unset}", SRMap(&[])) + } + + #[test] + fn merge_and_unset() -> Result<(), String> { + script_eval_to("m = {a = 1}, {^:m, a = :unset}", SRMap(&[])) + } + #[test] fn forced_function_capture() -> Result<(), String> { script_eval_to("b = {a = 1}; f = !(fn :x -> b::x); f a", SRString("1")) diff --git a/ergo_std/Cargo.toml b/ergo_std/Cargo.toml index da0e872c..e2bafc82 100644 --- a/ergo_std/Cargo.toml +++ b/ergo_std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ergo_std" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["Alex Franchuk "] edition = "2021" diff --git a/ergo_std/ChangeLog.md b/ergo_std/ChangeLog.md index c69948bd..86dafe58 100644 --- a/ergo_std/ChangeLog.md +++ b/ergo_std/ChangeLog.md @@ -1,5 +1,8 @@ # ergo_std changelog +## 1.0.0-rc.3 -- 2021-12-14 +* No changes. + ## 1.0.0-rc.2 -- 2021-12-13 * Add `std:io:is-terminal` to check whether a stream is connected to a terminal. * Add `std:fs:file-type` to get the file type of a path.