refactor: remove lazyeval usage in [.igraph.vs#1445
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
[.igraph.vs
3c95477 to
9fa5965
Compare
| extern SEXP R_igraph_write_graph_ncol(SEXP, SEXP, SEXP, SEXP); | ||
| extern SEXP R_igraph_write_graph_pajek(SEXP, SEXP); | ||
| extern SEXP UUID_gen(SEXP); | ||
| extern SEXP make_lazy(SEXP, SEXP, SEXP); |
There was a problem hiding this comment.
this file is read-only, how was I supposed to remove these lines then? 😅
There was a problem hiding this comment.
Regenerate using R -e 'cpp11::cpp_register()'. This is why I keep insisting that these procedures must be documented in wiki pages.
There was a problem hiding this comment.
oh right, thanks! or the contributing guide, a more usual place for R packages. 😸
| if (length(args) < 1 || | ||
| (length(args) == 1 && inherits(args[[1]]$expr, "name") && | ||
| as.character(args[[1]]$expr) == "")) { | ||
| ## or empty (what is the test case for this??) |
There was a problem hiding this comment.
g[,] perhaps? Or g[, na_ok = FALSE] ?
| as.character(args[[1]]$expr) == "")) { | ||
| ## or empty (what is the test case for this??) | ||
| ## try() because of .env$something would otherwise error | ||
| first_is_empty <- !nzchar(paste(rlang::quo_get_expr(args[[1]]), collapse = "")) |
There was a problem hiding this comment.
rlang::is_missing(args[[1]]) ? But we need a test case...
The .ignore_empty argument to rlang::enquos() might take care of that.
3fa4cd0 to
103f459
Compare
|
Does this make any sense: library("igraph")
#>
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#>
#> decompose, spectrum
#> The following object is masked from 'package:base':
#>
#> union
g <- make_ring(10)
V(g)[,]
#> + 10/10 vertices, from 847d690:
#> [1] 1 2 3 4 5 6 7 8 9 10
V(g)[, na_ok = FALSE]
#> + 10/10 vertices, from 847d690:
#> [1] 1 2 3 4 5 6 7 8 9 10
E(g)[,]
#> + 10/10 edges from 847d690:
#> [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10
E(g)[, na_ok = FALSE]
#> + 0/10 edges from 847d690:Created on 2024-08-22 with reprex v2.1.0 |
|
with the version of main it's actually worse library("igraph")
#>
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#>
#> decompose, spectrum
#> The following object is masked from 'package:base':
#>
#> union
g <- make_ring(10)
V(g)[,]
#> Error in eval(x$expr, data, x$env): argument is missing, with no default
V(g)[, na_ok = FALSE]
#> + 10/10 vertices, from 2584d97:
#> [1] 1 2 3 4 5 6 7 8 9 10
E(g)[,]
#> Error in eval(x$expr, data, x$env): argument is missing, with no default
E(g)[, na_ok = FALSE]
#> Error in eval(x$expr, data, x$env): argument is missing, with no defaultCreated on 2024-08-22 with reprex v2.1.0 |
|
The |
|
Actually |
|
This pull request can't be queued because it's currently a draft. |
98b3602 to
76626c2
Compare
|
This pull request can't be queued because it's currently a draft. |
76626c2 to
22cd596
Compare
22cd596 to
5a7dde9
Compare
5a7dde9 to
13151a1
Compare
Fix #1426
I'm less confident about this one.