Repository navigation
Fix package detection for quoted function calls - #306
Closed
LeonidasZhak wants to merge 1 commit into
Closed
LeonidasZhak wants to merge 1 commit into
LeonidasZhak wants to merge 1 commit into
Conversation
Collaborator
|
@LeonidasZhak this is already being addressed in #301 |
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.
Summary
Fixes package detection for function calls written with explicit quotes, including replacement functions such as
colnames<-.Thanks to maintainers
Thanks for tracing this to the mismatch between the parsed token text and the names returned by namespace exports.
Issue or motivation
Closes #271.
get_used_functions()currently reports`colnames<-`as!!! NOT FOUND !!!when it appears in explicit quoted call form, even though the same replacement function is available from base R.Root cause
The parse data keeps the quotes in
SYMBOL_FUNCTION_CALLtext, while the search-path lookup contains canonical function names without those quotes. The direct string comparison therefore misses replacement functions called this way.Change
get_used_functions()now normalizes quoted function-call tokens before resolving their package. I also added a regression test for the issue example and updated the NEWS entry.While running the repository link check, two Pharmar white-paper links were found to redirect from
www.pharmar.orgtopharmar.org; those links were updated so the PR does not leave the existing link-check workflow failing.Tests
main:`colnames<-`was reported as!!! NOT FOUND !!!.`colnames<-`passed after the change.styler::style_file(c("R/get.R", "tests/testthat/test-get.R", "vignettes/approved.Rmd"), dry = "on")passed.spelling::spell_check_package()passed.urlchecker::url_check()passed.covr::package_coverage(quiet = TRUE)completed; package coverage was 91.12%.R CMD build --no-manual --compact-vignettes=gs+qpdf .passed._R_CHECK_CRAN_INCOMING_REMOTE_=false R CMD check --no-manual --as-cran logrx_0.4.0.9000.tar.gzpassed with one NOTE for the development version number.Scope
This PR only changes package detection for quoted function calls and updates two redirected documentation URLs found by the repository link check. It does not change logging output structure, package approval logic, roxygen-generated files, README output, or pkgdown site files.
Repository checklist
devtools::document(); its unrelated generated-file changes were not includedpkgdown::build_site()is not needed because no rendered examples, reference entries, or site structure changedR CMD checklocally and addressed errors and warnings