Re: [R-pkg-devel] Strange error from CRAN on package submission
This seems more like a problem with the CRAN test machine, with the movMF package installed with flexmix available but loaded with flexmix not available, maybe interacting with a caching mechanism used by the methods package to avoid re-computing methods tables? Otherwise how would movMF ever know to create the flexmix class / method? It seems like this could cause problems for the user if they installed movMV with flexmix available, but removed flexmix. This seems like a subtler variation of 'I installed package A but then removed dependency B and now A doesn't work', which could be a bug in R's remove.packages() but I tried to emulate the scenario of installing movMF and then removing flexmix in an interactive session, and then looking for the warning reported below. I was not successful, but the build report with the error is no longer available so I don't know what I'm looking for... Martin Morgan On 11/11/20, 4:44 PM, "R-package-devel on behalf of Duncan Murdoch" wrote: Here's what I think is happening. In the movMF:::.onLoad function there's a test whether flexmix is installed. If found, then it is loaded and some methods are set. (I'm not sure what caused flexmix to be installed: I didn't intentionally install it, but it ended up in there when I installed enough stuff to check Mercator.) In the R-devel --as-cran checks, some checks are run with only strong dependencies of your package visible. Somehow I think that .onLoad function sees flexmix and loads it, but then some other part of the check can't see it. A workaround is to add flexmix to your Imports clause. This is a strong enough dependency to make it visible, and the error goes away. HOWEVER, to me this is pretty clearly an R-devel bug: you have no control over methods set by packages that you don't even use, so you shouldn't have to change your dependency lists if one of them sets a method that you're using. Duncan Murdoch On 11/11/2020 3:31 p.m., Kevin R. Coombes wrote: > Oh, I forgot to mention explicitly that checking (with --as-cran) on the > development version of R on Windows also produces no errors or warnings. > > On 11/11/2020 1:39 PM, Kevin R. Coombes wrote: >> Hi Duncan, >> >> I just sent a longer version of this message, but it looks to me like >> the underlying issue is the fact that flexmix and Mercator both define >> and export "show" methods for their S4 classes. What confuses me is >> why the NAMESPACE of a package that is merely Suggest'ed by something >> several layers down the hierarchy should get attached and cause an >> issue like this one. (The attached NAMESPACE happens in current >> versions of R.) >> >> Thanks, >>Kevin >> >> On 11/11/2020 1:07 PM, Duncan Murdoch wrote: >>> Okay, I've tried testing on my Mac with R 4.0.3 and R-devel for the >>> new one, 4.0.3 for the CRAN version. >>> >>> I'm not seeing any check error with the CRAN version. I get an error >>> trying to check 0.11.4 from R-forge because I don't have flexmix >>> installed. If I take flexmix out of the Suggests list, it checks >>> with no error on 4.0.3, but I get the error you saw on R-devel when >>> checked with --as-cran. >>> >>> I tried debugging this, and narrowed it down a bit. It happens when >>> your package is installed, in particular in the do_install_source() >>> function in src/library/tools/R/install.R. But that function runs a >>> new R instance, and I didn't get to debugging that. I'll try again >>> later today if nobody else figures it out. >>> >>> Duncan Murdoch >>> >>> >>> >>> >>> On 11/11/2020 12:03 p.m., Kevin R. Coombes wrote: Hi Duncan, Oops; I didn't realize I had forgotten to push updates to the OOMPA web site. The code for Mercator is contained as part of the Thresher project in the subversion repository on R-Forge. (https://r-forge.r-project.org/projects/thresher/) It's under pkg/Mercator below that URL Thanks, Kevin On 11/11/2020 11:30 AM, Duncan Murdoch wrote: > Uwe suggested you suggest flexmix, but I see below you already tried > that. > > I'd like to take a look, but I can't find your package. The existing > version on CRAN gives the URL as http://oompa.r-forge.r-project.org/, > but I can't see it mentioned there. > > Duncan Murdoch > > On 11/11/2020 8:44 a.m., Kevin R. Coombes wrote: >> Hi, >> >> I am trying to figure out how to fix warnings from two of the CRAN >> machines on the submission of an update to a package. The only >> change to >> my package was to add a "show" method to one
Re: [R-pkg-devel] Strange error from CRAN on package submission
Hi Martin, I think you may be right that it is something odd about the configuration on the test machine, since I haven't been able to reproduce it anywhere else. But Duncan did say he could reproduce it in R-devel but not R-4.0.3, so there's that. The error message is buried deep in this thread, but it was: Check: whether package can be installed. Result: WARN Found the following significant warnings: Warning: namespace ‘flexmix’ is not available and has been replaced Check: data for non-ASCII characters Result: WARN Warning: namespace 'flexmix' is not available and has been replaced by .GlobalEnv when processing object '' Best, Kevin On 11/12/2020 10:13 AM, Martin Morgan wrote: This seems more like a problem with the CRAN test machine, with the movMF package installed with flexmix available but loaded with flexmix not available, maybe interacting with a caching mechanism used by the methods package to avoid re-computing methods tables? Otherwise how would movMF ever know to create the flexmix class / method? It seems like this could cause problems for the user if they installed movMV with flexmix available, but removed flexmix. This seems like a subtler variation of 'I installed package A but then removed dependency B and now A doesn't work', which could be a bug in R's remove.packages() but I tried to emulate the scenario of installing movMF and then removing flexmix in an interactive session, and then looking for the warning reported below. I was not successful, but the build report with the error is no longer available so I don't know what I'm looking for... Martin Morgan On 11/11/20, 4:44 PM, "R-package-devel on behalf of Duncan Murdoch" wrote: Here's what I think is happening. In the movMF:::.onLoad function there's a test whether flexmix is installed. If found, then it is loaded and some methods are set. (I'm not sure what caused flexmix to be installed: I didn't intentionally install it, but it ended up in there when I installed enough stuff to check Mercator.) In the R-devel --as-cran checks, some checks are run with only strong dependencies of your package visible. Somehow I think that .onLoad function sees flexmix and loads it, but then some other part of the check can't see it. A workaround is to add flexmix to your Imports clause. This is a strong enough dependency to make it visible, and the error goes away. HOWEVER, to me this is pretty clearly an R-devel bug: you have no control over methods set by packages that you don't even use, so you shouldn't have to change your dependency lists if one of them sets a method that you're using. Duncan Murdoch On 11/11/2020 3:31 p.m., Kevin R. Coombes wrote: > Oh, I forgot to mention explicitly that checking (with --as-cran) on the > development version of R on Windows also produces no errors or warnings. > > On 11/11/2020 1:39 PM, Kevin R. Coombes wrote: >> Hi Duncan, >> >> I just sent a longer version of this message, but it looks to me like >> the underlying issue is the fact that flexmix and Mercator both define >> and export "show" methods for their S4 classes. What confuses me is >> why the NAMESPACE of a package that is merely Suggest'ed by something >> several layers down the hierarchy should get attached and cause an >> issue like this one. (The attached NAMESPACE happens in current >> versions of R.) >> >> Thanks, >>Kevin >> >> On 11/11/2020 1:07 PM, Duncan Murdoch wrote: >>> Okay, I've tried testing on my Mac with R 4.0.3 and R-devel for the >>> new one, 4.0.3 for the CRAN version. >>> >>> I'm not seeing any check error with the CRAN version. I get an error >>> trying to check 0.11.4 from R-forge because I don't have flexmix >>> installed. If I take flexmix out of the Suggests list, it checks >>> with no error on 4.0.3, but I get the error you saw on R-devel when >>> checked with --as-cran. >>> >>> I tried debugging this, and narrowed it down a bit. It happens when >>> your package is installed, in particular in the do_install_source() >>> function in src/library/tools/R/install.R. But that function runs a >>> new R instance, and I didn't get to debugging that. I'll try again >>> later today if nobody else figures it out. >>> >>> Duncan Murdoch >>> >>> >>> >>> >>> On 11/11/2020 12:03 p.m., Kevin R. Coombes wrote: Hi Duncan, Oops; I didn't realize I had forgotten to push updates to the OOMPA web site. The code for Mercator is contained as part of the Thresher project in the subversion repository on R-Forge. (https://r-forge.r-project.org/projects/thresher/) It's under pkg/Mercator below that URL
Re: [R-pkg-devel] Strange error from CRAN on package submission
Actually I think it is a bug in the check code. I've just posted about this on the R-devel list. Duncan Murdoch On 12/11/2020 10:13 a.m., Martin Morgan wrote: This seems more like a problem with the CRAN test machine, with the movMF package installed with flexmix available but loaded with flexmix not available, maybe interacting with a caching mechanism used by the methods package to avoid re-computing methods tables? Otherwise how would movMF ever know to create the flexmix class / method? It seems like this could cause problems for the user if they installed movMV with flexmix available, but removed flexmix. This seems like a subtler variation of 'I installed package A but then removed dependency B and now A doesn't work', which could be a bug in R's remove.packages() but I tried to emulate the scenario of installing movMF and then removing flexmix in an interactive session, and then looking for the warning reported below. I was not successful, but the build report with the error is no longer available so I don't know what I'm looking for... Martin Morgan On 11/11/20, 4:44 PM, "R-package-devel on behalf of Duncan Murdoch" wrote: Here's what I think is happening. In the movMF:::.onLoad function there's a test whether flexmix is installed. If found, then it is loaded and some methods are set. (I'm not sure what caused flexmix to be installed: I didn't intentionally install it, but it ended up in there when I installed enough stuff to check Mercator.) In the R-devel --as-cran checks, some checks are run with only strong dependencies of your package visible. Somehow I think that .onLoad function sees flexmix and loads it, but then some other part of the check can't see it. A workaround is to add flexmix to your Imports clause. This is a strong enough dependency to make it visible, and the error goes away. HOWEVER, to me this is pretty clearly an R-devel bug: you have no control over methods set by packages that you don't even use, so you shouldn't have to change your dependency lists if one of them sets a method that you're using. Duncan Murdoch On 11/11/2020 3:31 p.m., Kevin R. Coombes wrote: > Oh, I forgot to mention explicitly that checking (with --as-cran) on the > development version of R on Windows also produces no errors or warnings. > > On 11/11/2020 1:39 PM, Kevin R. Coombes wrote: >> Hi Duncan, >> >> I just sent a longer version of this message, but it looks to me like >> the underlying issue is the fact that flexmix and Mercator both define >> and export "show" methods for their S4 classes. What confuses me is >> why the NAMESPACE of a package that is merely Suggest'ed by something >> several layers down the hierarchy should get attached and cause an >> issue like this one. (The attached NAMESPACE happens in current >> versions of R.) >> >> Thanks, >>Kevin >> >> On 11/11/2020 1:07 PM, Duncan Murdoch wrote: >>> Okay, I've tried testing on my Mac with R 4.0.3 and R-devel for the >>> new one, 4.0.3 for the CRAN version. >>> >>> I'm not seeing any check error with the CRAN version. I get an error >>> trying to check 0.11.4 from R-forge because I don't have flexmix >>> installed. If I take flexmix out of the Suggests list, it checks >>> with no error on 4.0.3, but I get the error you saw on R-devel when >>> checked with --as-cran. >>> >>> I tried debugging this, and narrowed it down a bit. It happens when >>> your package is installed, in particular in the do_install_source() >>> function in src/library/tools/R/install.R. But that function runs a >>> new R instance, and I didn't get to debugging that. I'll try again >>> later today if nobody else figures it out. >>> >>> Duncan Murdoch >>> >>> >>> >>> >>> On 11/11/2020 12:03 p.m., Kevin R. Coombes wrote: Hi Duncan, Oops; I didn't realize I had forgotten to push updates to the OOMPA web site. The code for Mercator is contained as part of the Thresher project in the subversion repository on R-Forge. (https://r-forge.r-project.org/projects/thresher/) It's under pkg/Mercator below that URL Thanks, Kevin On 11/11/2020 11:30 AM, Duncan Murdoch wrote: > Uwe suggested you suggest flexmix, but I see below you already tried > that. > > I'd like to take a look, but I can't find your package. The existing > version on CRAN gives the URL as http://oompa.r-forge.r-project.org/, > but I can't see it mentioned there. > > Duncan Murdoch > > On 11/11/2020 8:44 a.m., Kevin R. Coombes wrote: >> Hi,