savvy now generates a reduced number of R functions.
savvy-cli now rejects a package name containing ..
[v0.7.1] (2024-10-21)
Bug fixes
NumericScalar::as_usize() and NumericSexp::iter_usize() now fail if the
number is larger than 2^53 - 1 because this is the maximum number that can
be safely converted to usize.
[v0.7.0] (2024-10-20)
Breaking Change
Removed TryFrom<Sexp> for usize, so the following code no longer compiles.
Instead, you can use i32 and convert it to usize by yourself. If you are
sure the input number is never negative, you can just use the as conversion.
If you are not sure, you should use <usize>::try_from() and handle the error
by yourself. Also, please be aware you need to handle NA as well.
#[savvy]
fn foo(x: i32) -> savvy::Result<()> {
if x.is_na() {
return Err("cannot convert NA to usize".into())?;
}
let x = <usize>::try_from(x).map_err(|e| e.to_string().into());
...
}
Alternatively, you can use newly-added methods, NumericScalar::as_usize() and
NumericSexp::iter_usize(). What's good is that this can handle integer-ish
numeric, which means you can allow users to input a larger number than the
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)
Updates the requirements on savvy to permit the latest version.
Changelog
Sourced from savvy's changelog.
... (truncated)
Commits
ffaff16
chore: Release6221b2a
Reject dot-containing package name (#320)1b256b7
Add document about--print=native-static-libs
a4bfa36
Add a CHANGELOG item for #3198e0e253
Squash$<-
and[[<-
method to common ones (#319)e4373ae
HandleDEBUG
envvar in configure script rather than in Makevars (#317)b9de571
One-char typo fix (#316)edd2877
chore: Releasedb7cfbc
Reject the conversion from >2^53 to usize (#313)b2a4168
chore: ReleaseDependabot 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