Re: [R-pkg-devel] Vignette error: "there is no package called 'markdown'"

2024-06-29 Thread Ivan Krylov via R-package-devel
В Fri, 28 Jun 2024 22:55:23 -0500
Spencer Graves  пишет:

> I'm getting, "Error: processing vignette 'sos.Rmd' failed
> with diagnostics: there is no package called 'markdown'":
> 
> 
> https://github.com/sbgraves237/sos/actions/runs/9721300082/job/26833793243
> 
> 
> This is in:
> 
> 
> https://github.com/sbgraves237/sos/blob/master/vignettes/sos.Rmd

This is an rmarkdown vignette, but you're setting
\VignetteBuilder{knitr::knitr}. Does the error go away if you set
\VignetteBuilder{knitr::rmarkdown}?

Also, it's best to put both knitr and rmarkdown in the VignetteBuilder
field of the DESCRIPTION, because both packages are required to process
the vignette successfully.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Incomprehensible warning while checking

2024-06-29 Thread Ivan Krylov via R-package-devel
В Fri, 28 Jun 2024 17:57:13 -0400
Iris Simmons  пишет:

> * checking whether the namespace can be unloaded cleanly ... WARNING
>  unloading

Here's what the check does (in a separate process):

invisible(suppressMessages(loadNamespace("this.path")));
cat('\n unloading\n');
unloadNamespace("this.path")

Since the output stops at " unloading", the package may be crashing
somewhere in SEXP do_onUnload(...). I couldn't reproduce the crash with
this.path_2.4.0.20 (commit 301f3691e93dce95adf937387b1a7bbbed5ae15d)
you currently have available in the Git repository, but I did find
this.path_2.5.0.tar.gz in the archive subdirectory on the CRAN FTP
server, which crashes R-devel but not R-4.4.1 on Windows:

* checking whether the namespace can be unloaded cleanly ...Rterm.exe caused an 
Access Violation at location 7FFCC43B2640 DEP violation at location 
7FFCC43B2640.

AddrPC   Params
7FFCC43B2640 7FFCB98E85D8 01DCA1D23E60 01DCA1D20500
7FFCBFB758B4 01DCA1D24AB0    
this.path.dll!getInFrame+0x54  
[C:/Users/user/THISPA~1.RCH/00_PKG~1/THIS~1.PAT/src/thispathdefn.c @ 120]
   118: Rf_error(_("object '%s' not found"), 
EncodeChar(PRINTNAME(sym)));
   119: if (TYPEOF(value) == PROMSXP) {
>  120: if (ptr_PRVALUE(value) == R_UnboundValue) {
   121: Rf_protect(value);
   122: value = Rf_eval(value, R_EmptyEnv);
7FFCBFB579B1 01DCA1D04110 006D595FCA78 01DC9D42BFC8  
this.path.dll!do_onUnload+0x2c1  
[C:/Users/user/THISPA~1.RCH/00_PKG~1/THIS~1.PAT/src/ns-hooks.c @ 1011]
  1009: R_ProtectWithIndex(expr = Rf_cons(libpath, R_NilValue), &indx);
  1010: R_Reprotect(expr = Rf_cons(Rf_mkString("this.path"), expr), 
indx);
> 1011: R_Reprotect(expr = 
> Rf_lcons(getFromBase(Rf_install("library.dynam.unload")), expr), indx);
  1012: R_Reprotect(expr = Rf_cons(expr, R_NilValue), indx);
  1013: R_Reprotect(expr = Rf_lcons(getFromBase(on_exitSymbol), expr), 
indx);
7FFCB7525CCF 01DCA02A6C70 01DC9D452A78 01DC9D42BF58  
R.dll!do_External+0x28f  [C:/R/R-svn/src/main/dotcode.c @ 573]

I don't understand why a call to
on.exit(library.dynam.unload("this.path", libpath)) has to be
constructed this way and not directly in R/ns-hooks.R (something to do
with R-2.15.0 compatibility? that's very impressive, by the way, as are
the rest of the package internals), but I hope that this helps you
diagnose the problem further.

One other thing I also found was a small memory leak: the memory
allocated in path_join -> unix_path_join -> src/pathjoin.c:461 is not
released. (Looks like it's the same in windows_path_join.) I'd use
R_alloc if I could.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Vignette error: "there is no package called 'markdown'"

2024-06-29 Thread Spencer Graves

  That was it. Thanks very much.


	  Now I can go back to working on the "[.findFn" problem that you 
helped me identify. (I translated the Sweave vignette to RMarkdown to 
isolate that. Progress, with your help.)



  Spencer


On 6/29/24 04:47, Ivan Krylov wrote:

В Fri, 28 Jun 2024 22:55:23 -0500
Spencer Graves  пишет:


  I'm getting, "Error: processing vignette 'sos.Rmd' failed
with diagnostics: there is no package called 'markdown'":


https://github.com/sbgraves237/sos/actions/runs/9721300082/job/26833793243


  This is in:


https://github.com/sbgraves237/sos/blob/master/vignettes/sos.Rmd


This is an rmarkdown vignette, but you're setting
\VignetteBuilder{knitr::knitr}. Does the error go away if you set
\VignetteBuilder{knitr::rmarkdown}?

Also, it's best to put both knitr and rmarkdown in the VignetteBuilder
field of the DESCRIPTION, because both packages are required to process
the vignette successfully.



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel