v0.6.0 (2024-04-20)
Release Notes
Breaking changes
-
savvy-cli test
now parses test modules marked with#[cfg(savvy_test)]
instead of#[cfg(test)]
. The purpose of this change is to letcargo test
run for the tests unrelated to a real R sessions. -
Savvy now generates different names of Rust functions and C functions;
previously, the original function name is used for the FFI functions, but now
it'ssavvy_{original}_ffi
. This change shouldn't affect ordinary users.This change was necessary to let
#[savvy]
preserve the original function so
that we can write unit tests on the function easily. One modification is that
the function is made public. For more details, please read the Testing section
in the guide. -
The generated R wrapper file is now named as
000-wrappers.R
instead of
wrappers.R
. This makes the file is loaded first so that you can override
some of the R functions (e.g., aprint()
method for an enum) in another R
file. The old wrapper filewrappers.R
is automatically deleted bysavvy-cli update
New features
-
Added a function
eval_parse_text()
, which is an equivalent to R's idiom
eval(parse(text = ))
. This is mainly for testing purposes. -
Added a function
is_r_identical()
, which is an equivalent to R's
identical()
. This is mainly for testing purposes. -
Added a function
assert_eq_r_code()
if the first argument has the same data
as the result of the R code of the second argument.Example:
let mut x = savvy::OwnedRealSexp::new(3)?; x[1] = 1.0; x[2] = 2.0; assert_eq_r_code(x, "c(0.0, 1.0, 2.0)");
-
savvy-cli test
now picks[dev-dependencies]
from the crate'sCargo.toml
as the dependencies to be used for testing. -
savvy-cli test
got--features
argument to add features to be used for
testing.
Download savvy-cli 0.6.0
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |