Closed Ilia-Kosenkov closed 3 years ago
I thought we recently committed a fix for this (#130). Is it only empty parentheses that cause issues?
I didn't expect empty parentheses. We can fix here, if necessary.
I probably lost track of implemented changes, let me double-check this.
Ok, it indeed fails if there is nothing in parentheses:
# Equivalent to
# #[extendr()]
# fn test_fn() {}
rextendr:::find_exports(c("#[extendr()]", "fn test_fn () {}"))
#> Error: Problem with `mutate()` input `..1`.
#> i `..1 = .data$name`.
#> x Column `name` not found in `.data`
# Works if space is put into the parentheses
# #[extendr( )]
# fn test_fn() {}
rextendr:::find_exports(c("#[extendr( )]", "fn test_fn () {}"))
#> # A tibble: 1 x 3
#> name type lifetime
#> <chr> <chr> <chr>
#> 1 test_fn fn <NA>
packageDescription("rextendr")$GithubSHA1
#> [1] "31c3cd331b0923f17da22c0f27d2168c2014f1e7"
Created on 2021-08-23 by the reprex package (v2.0.1)
extendr
now can be configured by providing different flags to the#[extendr]
attribute. The current implementation of{rextendr}
parser, which determine what exports should be generated, is unable to handle parentheses in the attribute, see output belowCreated on 2021-08-23 by the reprex package (v2.0.0)
Somewhat related to #131