[R-pkg-devel] help fixing CRAN package sos
Spencer Graves
@pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Mon May 22 19:01:41 CEST 2023
Hi, Uwe et al.:
Uwe suggests I postprocess output with gsub("_", "\\\\_", output).
It's not clear to me where I should apply this. The "WARN" flags the
sos vignette sos.Rnw, but the offending code refers to pspline_checker,
which is not in the version of the vignette available on CRAN.[1] The
text of sos.Rnw is available on GitHub.[2] I am not eager to change the
code in the package, because it could break something else that's
currently working.
Suggestions?
Thanks,
Spencer Graves
[1]
https://cran.r-project.org/web/packages/sos/vignettes/sos.pdf
[2]
https://github.com/sbgraves237/sos/blob/master/vignettes/sos.Rnw
On 5/16/23 7:41 AM, Uwe Ligges wrote:
>
>
> On 16.05.2023 14:02, Spencer Graves wrote:
>>
>>
>> On 5/16/23 6:06 AM, Uwe Ligges wrote:
>>>
>>>
>>> On 16.05.2023 01:46, Spencer Graves wrote:
>>>> Hello, All:
>>>>
>>>>
>>>> The sos package is failing some CRAN checks, complaining:[1]
>>>>
>>>>
>>>> LaTeX errors:
>>>> ! Missing $ inserted.
>>>> <inserted text>
>>>> $
>>>> l.303 {\tt pspline_
>>>> checker} in the
>>>
>>>
>>> I can only guess this is part of the response you got from some sos
>>> request? I cannot reproduce it currently.
>>>
>>> So check:
>>> Does your package pass check if some function names including an
>>> underscore in the name is returned from an sos request?
>>
>>
>> Hi, Uwe et al.:
>>
>>
>> Thanks, Uwe, for your reply.
>>
>>
>> It's complaining about something in a vignette that has been
>> part of the package since it appeared in The R Journal in Volume 1/2
>> in 2009. I received an email from Prof. Ripley complaining that it
>> reported problems ("WARN") on some of the CRAN checks. When I asked,
>> Prof. Ripley reply's reply included:
>>
>>
>> >> l.303 {\tt pspline_
>> >> checker} in the
>> >> ! ==> Fatal error occurred, no output PDF file produced!
>> >>
>> >> Underlines need to be escaped in LaTeX. And as your results
>> depend on
>> >> Internet downloads,
>> >>
>> >> "Packages which use Internet resources should fail gracefully with an
>> >> informative message if the resource is not available or has changed
>> >> (and not give a check warning nor error)."
>> >>
>> >> applies: you need to anticipate that the results might include
>> >> underlines.
>>
>>
>> I don't know how to detect, let alone fix the "Underlines" that
>> "need to be escaped in LaTeX."
>
> If you receive an output, postprocess it via
>
> gsub("_", "\\\\_", output)
>
>
>
>>
>>
>> Regarding the other issue that "Packages which use Internet
>> resources should fail gracefully with an informative message if the
>> resource is not available or has changed (and not give a check warning
>> nor error)", I assume I should wrap in "try" all tests in *.Rd files
>> that access the Internet and make sure that they don't fail "R CMD
>> check" if the Internet is not available.
>
> Yes.
>
> Best,
> Uwe Ligges
>
>
>>
>> Comments?
>> Thanks again,
>> Spencer Graves
>>
>>
>> p.s. Yesterday I remember I got "WARN" on three of six CRAN checks
>> against r-devel on different platforms and NOTE on four of the seven
>> other CRAN checks. Today I see "WARN" on only two. If I just wait,
>> these "WARN" problems may go away by themselves. However, Prof.
>> Ripley gave me other problems to fix, and I want to support our kind,
>> smart and generous English professor.
>>
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>>
>>>
>>>
>>>
>>>> ! Emergency stop.
>>>> <inserted text>
>>>> $
>>>> l.303 {\tt pspline_
>>>> checker} in the
>>>> ! ==> Fatal error occurred, no output PDF file produced!
>>>> --- failed re-building 'sos.Rnw'
>>>>
>>>>
>>>> I can NOT replicate these locally nor with GitHub action, and
>>>> I failed to find 'psp' in 'sos.Rnw'.[2] This raises two issue:
>>>>
>>>>
>>>> OBVIOUS: What can I do to fix this error, or at least to understand
>>>> it better?
>>>>
>>>>
>>>> SUBTLE: How can I configure "github action", so it can replicate
>>>> the errors reported on CRAN?
>>>>
>>>>
>>>> Thanks,
>>>> Spencer
>>>>
>>>>
>>>> [1]
>>>>
>>>>
>>>> https://cran.r-project.org
>>>>
>>>>
>>>> [2]
>>>>
>>>>
>>>> https://github.com/sbgraves237/sos
>>>>
>>>>
>>>> -------- Forwarded Message --------
>>>> Subject: Re: CRAN package sos
>>>> Date: Sun, 14 May 2023 14:46:06 +0100
>>>> From: Prof Brian Ripley <ripley using stats.ox.ac.uk>
>>>> Reply-To: CRAN <CRAN using r-project.org>
>>>> To: Spencer Graves <spencer.graves using prodsyse.com>
>>>> CC: CRAN using R-project.org
>>>>
>>>> <snip>
>>>>
>>>>
>>>> On 12/05/2023 13:03, Spencer Graves wrote:
>>>>> Hello, All:
>>>>
>>>> You have just spammed my personal email address, contrary to the
>>>> CRAN policy and done so deliberately and/or recklessly, overriding
>>>> the Reply-To header.
>>>>
>>>>> Is MASS being withdrawn along with multiple other packages
>>>>> (mgcv, survival, boot, lattice)?
>>>>
>>>> Not so. And that was a failure to do your own homework as you
>>>> should have looked on CRAN to see that they are still available.
>>>>
>>>> Further
>>>>
>>>> options(repos=c(CRAN="http://cran.cnr.berkeley.edu"))
>>>>
>>>> does not respect the user's choice of repository: that seems to make
>>>> re-making it unreasonably slow. On my very fast MacBook Pro
>>>>
>>>> * checking re-building of vignette outputs ...^R
>>>> [26s/265s] OK
>>>>
>>>> so it is waiting 90% of the time.
>>>>
>>>>
>>>>> That's responsible for 3 of the 4 'warnings' listed there.
>>>>> The warning for r-devel-linux-x86_64-fedora-gcc says "LaTeX errors:
>>>>> ! Missing $ inserted ... Fatal error occurred, no output PDF file
>>>>> produced! ... Vignette re-building failed."
>>>>>
>>>>>
>>>>> These all sound to me like operating system errors. If
>>>>> there's something here I should do, I could use help in
>>>>> understanding what.
>>>>
>>>> Do read the message -- it is a LaTeX error in the LaTeX code your
>>>> package's vignettes generates.
>>>>
>>>> LaTeX errors:
>>>> ! Missing $ inserted.
>>>> <inserted text>
>>>> $
>>>> l.303 {\tt pspline_
>>>> checker} in the
>>>> ! Emergency stop.
>>>> <inserted text>
>>>> $
>>>> l.303 {\tt pspline_
>>>> checker} in the
>>>> ! ==> Fatal error occurred, no output PDF file produced!
>>>>
>>>> Underlines need to be escaped in LaTeX. And as your results depend
>>>> on Internet downloads,
>>>>
>>>> "Packages which use Internet resources should fail gracefully with
>>>> an informative message if the resource is not available or has
>>>> changed (and not give a check warning nor error)."
>>>>
>>>> applies: you need to anticipate that the results might include
>>>> underlines.
>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Spencer Graves
>>>>> m: 1-408-655-4567
>>>>>
>>>>>
>>>>> On 5/12/23 1:38 AM, Prof Brian Ripley wrote:
>>>>>> Dear maintainer,
>>>>>>
>>>>>> Please see the problems shown on
>>>>>> <https://cran.r-project.org/web/checks/check_results_sos.html>.
>>>>>>
>>>>>> Please correct before 2023-05-26 to safely retain your package on
>>>>>> CRAN.
>>>>>>
>>>>>> The CRAN Team
>>>>
More information about the R-package-devel
mailing list