refactor!: kill igraph.arpack.default and arpack_defaults lists, add arpack_defaults() as a function#762
refactor!: kill igraph.arpack.default and arpack_defaults lists, add arpack_defaults() as a function#762maelle wants to merge 6 commits intoigraph:mainfrom
Conversation
…rpack_defaults() as a function!
|
We could allow a function in the places where |
Could you please elaborate? In my latest commit I added a maybe too complex way to deprecate the usage of
If that sounds like a good idea I'll add it (as an internal function) to other affected calls. |
| "1.5.0", | ||
| I("arpack_defaults"), | ||
| "arpack_defaults()", | ||
| details = "So a function, not an object." |
There was a problem hiding this comment.
I don't understand this wording.
| arpack <- function(func, extra = NULL, sym = FALSE, options = arpack_defaults(), | ||
| env = parent.frame(), complex = !sym) { | ||
|
|
||
| eval_try <- rlang::eval_tidy(options) |
There was a problem hiding this comment.
What do we need eval_tidy for? Can't we just force, and if the user has passed a function, we call it?
There was a problem hiding this comment.
We only need to catch the case where the argument is arpack_defaults and a function. I'm using rlang::call_args(rlang::current_call())[["options"]] on the following line hence the rlang here, especially as rlang is a dependency.
Now, maybe this whole "hack" is a bad idea.
krlmlr
left a comment
There was a problem hiding this comment.
Looks good! Can you please merge when the checks pass?
|
actually no, I need to expand the hack to all functions here. |
|
actually with ensure_igraph() on the main branch, I'll just close and start again. |
Fix #714
@krlmlr actually I see usage of the old name in reverse dependencies, should I
Whilst replacing occurrences of the old name, I noticed the opportunity to use
modifyList(), so this PR does that too but in a different commit. 😇