Skip to content

Conversation

@MichaelChirico
Copy link
Contributor

One complication is the changes to R/splom.R. Basically we have a contradiction between the package source and what's tested:

pscales = list(list(at = 6, lab = "six", limits = c(-10, 10)),

In effect, under partial matching, any pscales entry with a name starting with lim is accepted, but any user with strict matching rules must supply lim.

If the intention truly is to let the user supply any ^lim.* list item, that should be better encoded in the sources (and perhaps documented); this PR assumes the test is in error instead to avoid back-compatibility issues.

Details

To reproduce:

setwd('tests')
pmatchRe = "partial( argument)? match"
writeLines(con=".Rprofile", c(
  "options(warnPartialMatchArgs=TRUE, warnPartialMatchAttr=TRUE, warnPartialMatchDollar=TRUE)",
  sprintf("globalCallingHandlers(warning=function(c) if (grepl('%s', conditionMessage(c))) stop(c) else warning(c))", pmatchRe)
))

tests = list.files(pattern='[.][rR]$', full.names=TRUE)
for (t in tests) local({
  system2("R", c("CMD", "BATCH", t))
  tmp = paste0(basename(t), "out")
  on.exit(unlink(tmp))
  l = grep(pmatchRe, readLines(tmp), value=TRUE)
  if (length(l)) message(t, "\n", l)
})

unlink(".Rprofile")

@deepayan deepayan merged commit 757d099 into deepayan:master Apr 26, 2024
@deepayan
Copy link
Owner

Thanks. Would you mind filing an issue about the lim vs limits thing? I would like to fix it eventually, when I feel brave enough to do a revdep check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants