Now savvy no longer uses SETLENGTH, which is a so-called "non-API" thing.
[v0.6.0] (2024-04-20)
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 let cargo 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's savvy_{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., a print() method for an enum) in another R
file. The old wrapper file wrappers.R is automatically deleted by savvy-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's Cargo.toml
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps savvy from 0.5.3 to 0.6.1.
Changelog
Sourced from savvy's changelog.
... (truncated)
Commits
a1daf27
chore: Release5b72c9b
Do not useSETLENGTH
(#214)bf82415
doc:pub use
is not necessary (#213)4ef03d9
guide (#212)770488e
Update check-non-api.yaml55ab76c
Check non-API calls (#210)20b6773
Ensure linebreak is LF (#207)1902bf1
Use Drop mechanism for managing PROTECT and UNPROTECT (#205)3c40e56
Add test examples in the template (#204)32a318b
Update test.mdDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show