Skip to content
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

repeated 'pager' entry in prototype for pager class #132

Closed
BillDunlap opened this issue Mar 19, 2019 · 4 comments
Closed

repeated 'pager' entry in prototype for pager class #132

BillDunlap opened this issue Mar 19, 2019 · 4 comments

Comments

@BillDunlap
Copy link

BillDunlap commented Mar 19, 2019

In CRAN's diffobj-0.2.2 R/pager.R provides two 'pager' entries in the prototype for class 'Pager'. That seems wrong and one of them should be omitted. Currently the second, which calls stop(), is the one used, but it seems like the first would be a better default value.

setClass(
  "Pager",
  slots=c(
    pager="function", file.ext="character", threshold="numeric",
    ansi="logical", file.path="character", make.blocking="logical"
  ),
  prototype=list(
    pager=function(x) writeLines(readLines(x)), file.ext="", threshold=0L,
    pager=function(x) stop("Pager object does not specify a paging function."),
    ansi=FALSE, file.path=NA_character_, make.blocking=FALSE
  )
@brodieG
Copy link
Owner

brodieG commented Mar 19, 2019

Obviously this is an oversight. Thanks for reporting. Looking at the blame it appears that I intended the first one to be the new setting, and clearly failed to test for that properly:

01648246 (brodieG 2016-04-30 21:54:15 -0400 231) setClass(
9b4e424c (brodieG 2016-05-07 20:45:37 -0400 232)   "Pager",
a73cad91 (brodieG 2016-11-05 21:17:15 -0400 233)   slots=c(
269bf03d (brodieG 2016-11-06 10:46:50 -0500 234)     pager="function", file.ext="character", threshold="numeric",
98148365 (brodieG 2019-01-01 20:39:54 -0500 235)     ansi="logical", file.path="character", make.blocking="logical"
a73cad91 (brodieG 2016-11-05 21:17:15 -0400 236)   ),
9b4e424c (brodieG 2016-05-07 20:45:37 -0400 237)   prototype=list(
8f28e201 (brodieG 2018-12-31 14:37:14 -0500 238)     pager=function(x) writeLines(readLines(x)), file.ext="", threshold=0L,
a73cad91 (brodieG 2016-11-05 21:17:15 -0400 239)     pager=function(x) stop("Pager object does not specify a paging function."),
98148365 (brodieG 2019-01-01 20:39:54 -0500 240)     ansi=FALSE, file.path=NA_character_, make.blocking=FALSE
413422ae (brodieG 2016-05-07 20:52:59 -0400 241)   ),

I'll add that to the list for the next release.

Is this causing you problems right now? Next release probably won't be for a while unless you actually have an immediate need for this being fixed. If so I can prioritize earlier.

@brodieG brodieG added the bug label Mar 19, 2019
@brodieG brodieG added this to the 0.2.3 milestone Mar 19, 2019
@BillDunlap
Copy link
Author

BillDunlap commented Mar 19, 2019 via email

@brodieG
Copy link
Owner

brodieG commented May 6, 2019

This should be fixed on the development branch. Hope to send out to CRAN in the next week or two.

brodieG added a commit that referenced this issue May 13, 2019
Fix #135, Fix #134, Fix #136, Fix #133, Fix #132
see NEWS for details
@brodieG
Copy link
Owner

brodieG commented May 14, 2019

Up on CRAN now.

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

No branches or pull requests

2 participants