Skip to content

Commit d3dfcfe

Browse files
authored
Move from Rcpp+RcppEigen to cpp11 (#317)
1 parent f1cbb31 commit d3dfcfe

21 files changed

+541
-519
lines changed

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ggforce
22
Type: Package
33
Title: Accelerating 'ggplot2'
4-
Version: 0.4.1.9000
4+
Version: 0.5.0
55
Authors@R:
66
c(person(given = "Thomas Lin",
77
family = "Pedersen",
@@ -24,7 +24,6 @@ Depends:
2424
ggplot2 (>= 3.3.6),
2525
R (>= 3.3.0)
2626
Imports:
27-
Rcpp (>= 0.12.2),
2827
grid,
2928
scales,
3029
MASS,
@@ -41,7 +40,8 @@ Imports:
4140
cli,
4241
vctrs,
4342
systemfonts
44-
LinkingTo: Rcpp, RcppEigen
43+
LinkingTo:
44+
cpp11
4545
RoxygenNote: 7.2.3
4646
Suggests:
4747
sessioninfo,
@@ -51,7 +51,6 @@ Suggests:
5151
units (>= 0.8.0),
5252
covr
5353
Collate:
54-
'RcppExports.R'
5554
'aaa.R'
5655
'shape.R'
5756
'arc_bar.R'
@@ -64,6 +63,7 @@ Collate:
6463
'bspline_closed.R'
6564
'circle.R'
6665
'concaveman.R'
66+
'cpp11.R'
6767
'diagonal.R'
6868
'diagonal_wide.R'
6969
'ellipse.R'

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ import(ggplot2)
161161
import(rlang)
162162
import(vctrs)
163163
importFrom(MASS,fractions)
164-
importFrom(Rcpp,sourceCpp)
165164
importFrom(ggplot2,label_parsed)
166165
importFrom(ggplot2,layer)
167166
importFrom(grDevices,chull)
@@ -241,3 +240,4 @@ importFrom(tweenr,tween_t)
241240
importFrom(utils,packageVersion)
242241
importFrom(withr,with_seed)
243242
useDynLib(ggforce)
243+
useDynLib(ggforce, .registration = TRUE)

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ggforce (development version)
1+
# ggforce 0.5.0
22

33
* Fixed a bug that would cause reordering of data in some geoms (#314)
44
* The concaveman package is no longer a dependency for `geom_mark_hull()` (#308)

R/RcppExports.R

Lines changed: 0 additions & 35 deletions
This file was deleted.

R/cpp11.R

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Generated by cpp11: do not edit by hand
2+
3+
splinePath <- function(x, y, degree, knots, detail, type) {
4+
.Call(`_ggforce_splinePath`, x, y, degree, knots, detail, type)
5+
}
6+
7+
getSplines <- function(x, y, id, detail, type) {
8+
.Call(`_ggforce_getSplines`, x, y, id, detail, type)
9+
}
10+
11+
bezierPath <- function(x, y, detail) {
12+
.Call(`_ggforce_bezierPath`, x, y, detail)
13+
}
14+
15+
getBeziers <- function(x, y, id, detail) {
16+
.Call(`_ggforce_getBeziers`, x, y, id, detail)
17+
}
18+
19+
concaveman_c <- function(p, h, concavity, threshold) {
20+
.Call(`_ggforce_concaveman_c`, p, h, concavity, threshold)
21+
}
22+
23+
enclose_ellip_points <- function(x, y, id, tol) {
24+
.Call(`_ggforce_enclose_ellip_points`, x, y, id, tol)
25+
}
26+
27+
enclose_points <- function(x, y, id) {
28+
.Call(`_ggforce_enclose_points`, x, y, id)
29+
}
30+
31+
points_to_path <- function(pos, path, close) {
32+
.Call(`_ggforce_points_to_path`, pos, path, close)
33+
}

R/ggforce-package.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#' @useDynLib ggforce
22
#' @import ggplot2
3-
#' @importFrom Rcpp sourceCpp
43
#'
54
#' @examples
65
#' rocketData <- data.frame(
@@ -57,8 +56,9 @@
5756
"_PACKAGE"
5857

5958
## usethis namespace: start
60-
#' @importFrom lifecycle deprecated
6159
#' @import rlang
6260
#' @import vctrs
61+
#' @importFrom lifecycle deprecated
62+
#' @useDynLib ggforce, .registration = TRUE
6363
## usethis namespace: end
6464
NULL

cran-comments.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
Quick release to address the sanitizer issues reported by CRAN
1+
Bigger patch release addressing a range of bugs, as well as removing the
2+
concaveman, Rcpp, and RcppEigen dependency in favor of cpp11
3+
4+
## revdepcheck results
5+
6+
We checked 82 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
7+
8+
* We saw 0 new problems
9+
* We failed to check 0 packages
10+

man/figures/README-example-1.png

2 Bytes
Loading

revdep/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
11
# Revdeps
22

3-
## Failed to check (1)
4-
5-
|package |version |error |warning |note |
6-
|:-------|:-------|:-----|:-------|:----|
7-
|NA |? | | | |
8-
9-
## New problems (1)
10-
11-
|package |version |error |warning |note |
12-
|:----------------------------|:-------|:-----|:-------|:----|
13-
|[cubble](problems.md#cubble) |0.1.1 | |__+1__ | |
14-

revdep/cran.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
## revdepcheck results
22

3-
We checked 66 reverse dependencies (65 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
3+
We checked 82 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
44

5-
* We saw 1 new problems
5+
* We saw 0 new problems
66
* We failed to check 0 packages
77

8-
Issues with CRAN packages are summarised below.
9-
10-
### New problems
11-
(This reports the first line of each new failure)
12-
13-
* cubble
14-
checking re-building of vignette outputs ... WARNING
15-

revdep/failures.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1 @@
1-
# NA
2-
3-
<details>
4-
5-
* Version: NA
6-
* GitHub: NA
7-
* Source code: https://github.com/cran/NA
8-
* Number of recursive dependencies: 0
9-
10-
Run `cloud_details(, "NA")` for more info
11-
12-
</details>
13-
14-
## Error before installation
15-
16-
### Devel
17-
18-
```
19-
20-
21-
22-
23-
24-
25-
```
26-
### CRAN
27-
28-
```
29-
30-
31-
32-
33-
34-
35-
```
1+
*Wow, no problems at all. :)*

revdep/problems.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1 @@
1-
# cubble
2-
3-
<details>
4-
5-
* Version: 0.1.1
6-
* GitHub: https://github.com/huizezhang-sherry/cubble
7-
* Source code: https://github.com/cran/cubble
8-
* Date/Publication: 2022-06-02 12:30:06 UTC
9-
* Number of recursive dependencies: 136
10-
11-
Run `cloud_details(, "cubble")` for more info
12-
13-
</details>
14-
15-
## Newly broken
16-
17-
* checking re-building of vignette outputs ... WARNING
18-
```
19-
Error(s) in re-building vignettes:
20-
--- re-building ‘aggregation.Rmd’ using rmarkdown
21-
`summarise()` has grouped output by 'id'. You can override using the `.groups`
22-
argument.
23-
`summarise()` has grouped output by 'cluster', 'id'. You can override using the
24-
`.groups` argument.
25-
`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
26-
Adding missing grouping variables: `id`
27-
Quitting from lines 123-131 (aggregation.Rmd)
28-
Error: processing vignette 'aggregation.Rmd' failed with diagnostics:
29-
...
30-
The key variable is named differently in the two datasets. Coerce the key to id
31-
to bind them together.
32-
Only bind the common variables from both datasets.
33-
--- finished re-building ‘matching.Rmd’
34-
35-
SUMMARY: processing the following file failed:
36-
‘aggregation.Rmd’
37-
38-
Error: Vignette re-building failed.
39-
Execution halted
40-
```
41-
1+
*Wow, no problems at all. :)*

0 commit comments

Comments
 (0)