-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop locate
argument everywhere public-facing
#183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two minor further possible cleanups.
R/root.R
Outdated
@@ -140,7 +139,7 @@ empty_config_contents <- function() { | |||
## * also check that the outpack and orderly path are compatibible | |||
## (this is actually quite hard to get right, but should be done | |||
## before anything is created I think) | |||
root_open <- function(path, locate, require_orderly = FALSE, call = NULL) { | |||
root_open <- function(path, require_orderly = FALSE, call = parent.frame()) { | |||
if (is.null(call)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this line? Presumably no where calls this with an explicit call = NULL
.
R/root.R
Outdated
@@ -140,7 +139,7 @@ empty_config_contents <- function() { | |||
## * also check that the outpack and orderly path are compatibible | |||
## (this is actually quite hard to get right, but should be done | |||
## before anything is created I think) | |||
root_open <- function(path, locate, require_orderly = FALSE, call = NULL) { | |||
root_open <- function(path, require_orderly = FALSE, call = parent.frame()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you've added values for require_orderly
everywhere - would it be worth removing the default?
This PR drops the
locate
argument which was inconsistently present, had inconsistent arguments and was inconsistently used. We now search for the root fromroot
(usuallyNULL
) in all cases.Calls to
root_open
have been slightly simplified by adding a reasonable default forcall
; doing that everywhere is another bit of maintenance we can do later