Conversation
gaborcsardi
reviewed
Nov 2, 2022
| prefer_bullets <- function(pkgs, name) { | ||
| prefer <- map_chr(pkgs, function(pkg) { | ||
| cli::format_inline("{.run [conflict_prefer(\"{name}\", \"{pkg}\")](conflicted::conflict_prefer(\"{name}\", \"{pkg}\"))}") | ||
| }) |
Member
There was a problem hiding this comment.
Indentation seems off here. More importantly, no need to call format_inline() here, because later we pass this to cli_abort() which does the formatting (again). So it could be something like
sprintf("{.run [conflict_prefer(\"%s\", \"%s\")](conflicted::conflict_prefer(\"%s\", \"%s\"))}", name, pkg, name, pkg)Co-authored-by: Gábor Csárdi <csardi.gabor@gmail.com>
gaborcsardi
approved these changes
Jan 10, 2023
R/disambiguate.R
Outdated
| cli::cli_abort(c( | ||
| "{label_conflicted()} {.strong {name}} found in {length(pkgs)} packages.", | ||
| "Declare a preference with `conflict_prefer()`:", | ||
| "Declare a preference with {.code conflict_prefer()}:", |
Member
There was a problem hiding this comment.
Do we want to link to the help here? Or use {.fn conflict_prefer}?
R/disambiguate.R
Outdated
| "Either pick the one you want with {.code ::}:", | ||
| namespace, | ||
| "Or declare a preference with `conflict_prefer()`:", | ||
| "Or declare a preference with {.code conflict_prefer}:", |
Member
There was a problem hiding this comment.
Suggested change
| "Or declare a preference with {.code conflict_prefer}:", | |
| "Or declare a preference with {.fn conflict_prefer}:", |
Member
|
Looks good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.