-
Notifications
You must be signed in to change notification settings - Fork 154
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
provide exported functions for interacting with lockfiles #1438
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.
I definitely prefer the individual functions over providing a list of functions as an API.
@@ -416,7 +416,7 @@ local({ | |||
on.exit(do.call(base::options, saved), add = TRUE) | |||
} | |||
|
|||
catf("* Downloading from GitHub ... ", appendLF = FALSE) | |||
catf("* Downloading version %s from GitHub ... ", version, appendLF = FALSE) |
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.
Spurious diff?
#' @rdname lockfile | ||
#' @export | ||
lockfile_modify <- function(lockfile, | ||
..., |
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.
Not used?
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.
Not used internally, but I thought this might be useful for end users (e.g. a way to explicitly set the repositories in a lockfile)
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.
Oh I meant the ...
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.
Oh sorry. That's there intentionally so we can:
- Force some arguments to be named,
- Add new arguments (in any order) in a backwards compatible way.
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.
(but maybe I should add renv_dots_check()
to warn about unused arguments)
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.
Yeah, I think if you use ...
for this purpose, you need to error if there's anything in them.
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.
Ok; I made that change on main.
@@ -96,7 +96,80 @@ | |||
#' Note that the `Name` field may be empty. In that case, a project-local Python | |||
#' environment will be used instead (when not directly using a system copy of Python). | |||
#' | |||
#' @inheritParams snapshot |
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.
I'd suggest adding a "for expert use only" caution somewhere.
Maybe remove |
I did indeed do that 🙂 |
TBH I'm still on the fence on whether we should provide all these methods, or a single function
lockfile
that returns the "API" object as we did before.