[R-pkg-team] Bug#1000339: r-cran-raster breaks r-cran-satellite autopkgtest: unable to find an inherited method for function 'extend'
Robert J. Hijmans
r.hijmans at gmail.com
Fri Dec 3 23:36:40 GMT 2021
Andreas,
The background of this problem is the change in dependency between "raster"
and "terra". "terra" was dependent on "raster"; now it is the other way
around. This change was made in terra 1.4-07, 1.4-09 and 1.4-11 that were
released between 2021-10-05 and 2021-10-11, and in raster 3.5-2
(2021-10-11).
In the attachment I show the behavior of `library(satellite)` with the
raster package prior to 2021-10-11, with the current versions, and for
possible intermediate steps. It shows that you can get the warnings you see
if you have current versions of terra/raster but an old version of
satellite.
>From what I can tell from this log:
https://ci.debian.net/data/autopkgtest/testing/amd64/r/r-cran-satellite/16823806/log.gz
you are using satellite_1.0.4 and raster_3.5-2 (current versions), and
terra_1.4-11 (the current version is 1.4-22; but 1.4-11 should be OK).
Is it possible that your session is actually loading satellite_1.0.2?
Hope this helps,
Robert
On Tue, Nov 30, 2021 at 12:48 AM Andreas Tille <andreas at fam-tille.de> wrote:
> Control: forwarded -1 Robert J. Hijmans <r.hijmans at gmail.com>, Florian
> Detsch <fdetsch at web.de>
> Control: tags -1 upstream
> Control: tags -1 help
>
> Hi Robert and Florian,
>
> I'm contacting you as the maintainers or raster and satellite. As you
> can see below in the Debian packaged versions of these packages some
> conflict was raised in the test of satellite after the latest version of
> raster was uploaded.
>
> I'm perfectly aware that the packages are tested on CRAN and thus I
> assume that possibly some special circumstances in the Debian packaged
> version might lead to the issue that is reported in the bug below. I
> wonder whether you can give some hints how to solve the conflict in the
> test (at the very end of this mail).
>
> Thanks a lot for your help
>
> Andreas.
>
> Am Sun, Nov 21, 2021 at 09:24:52PM +0100 schrieb Paul Gevers:
> > Source: r-cran-raster, r-cran-satellite
> > Control: found -1 r-cran-raster/3.5-2-1
> > Control: found -1 r-cran-satellite/1.0.4-1
> > Severity: serious
> > Tags: sid bookworm
> > X-Debbugs-CC: debian-ci at lists.debian.org
> > User: debian-ci at lists.debian.org
> > Usertags: breaks needs-update
> >
> > Dear maintainer(s),
> >
> > With a recent upload of r-cran-raster the autopkgtest of r-cran-satellite
> > fails in testing when that autopkgtest is run with the binary packages of
> > r-cran-raster from unstable. It passes when run with only packages from
> > testing. In tabular form:
> >
> > pass fail
> > r-cran-raster from testing 3.5-2-1
> > r-cran-satellite from testing 1.0.4-1
> > all others from testing from testing
> >
> > I copied some of the output at the bottom of this report.
> >
> > Currently this regression is blocking the migration of r-cran-raster to
> > testing [1]. Due to the nature of this issue, I filed this bug report
> > against both packages. Can you please investigate the situation and
> reassign
> > the bug to the right package?
> >
> > More information about this bug and the reason for filing it can be
> found on
> > https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
> >
> > Paul
> >
> > [1] https://qa.debian.org/excuses.php?package=r-cran-raster
> >
> >
> https://ci.debian.net/data/autopkgtest/testing/amd64/r/r-cran-satellite/16823806/log.gz
> >
> > BEGIN TEST testthat.R
> >
> > R version 4.1.2 (2021-11-01) -- "Bird Hippie"
> > Copyright (C) 2021 The R Foundation for Statistical Computing
> > Platform: x86_64-pc-linux-gnu (64-bit)
> >
> > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > You are welcome to redistribute it under certain conditions.
> > Type 'license()' or 'licence()' for distribution details.
> >
> > R is a collaborative project with many contributors.
> > Type 'contributors()' for more information and
> > 'citation()' on how to cite R or R packages in publications.
> >
> > Type 'demo()' for some demos, 'help()' for on-line help, or
> > 'help.start()' for an HTML browser interface to help.
> > Type 'q()' to quit R.
> >
> > > library(testthat)
> > > library(satellite)
> > Loading required package: raster
> > Loading required package: sp
> > code for methods in class "Rcpp_SpatCategories" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatCategories" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatDataFrame" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatDataFrame" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatExtent" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatExtent" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatMessages" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatMessages" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatOptions" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatOptions" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatRaster" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatRaster" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatRasterCollection" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatRasterCollection" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatRasterStack" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatRasterStack" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatSRS" was not checked for suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatSRS" was not checked for suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatVector" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatVector" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpatVectorCollection" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpatVectorCollection" was not checked for
> > suspicious field assignments (recommended package 'codetools' not
> > available?)
> > code for methods in class "Rcpp_SpExtent" was not checked for suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpExtent" was not checked for suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPoly" was not checked for suspicious
> field
> > assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPoly" was not checked for suspicious
> field
> > assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPolyPart" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPolyPart" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPolygons" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > code for methods in class "Rcpp_SpPolygons" was not checked for
> suspicious
> > field assignments (recommended package 'codetools' not available?)
> > Warning messages:
> > 1: multiple methods tables found for 'crop' 2: multiple methods tables
> found
> > for 'extend' > > > ### functions to create test data sets -----
> > >
> > > ### Utility functions to quickly create test data sets for various
> sensors
> > > ### Florian Detsch, last modified on 2017-07-24
> > >
> > > tst_obj <- function(type = c("LC08", "LC8", "LE07", "LE7", "LT05")) {
> > + if (type[1] == "LC08")
> > + tst_obj_lc08()
> > + else if (type[1] == "LC8")
> > + tst_obj_lc8()
> > + else if (type[1] == "LE07")
> > + tst_obj_le07()
> > + else if (type[1] == "LE7")
> > + tst_obj_le7()
> > + else if (type[1] == "LT05")
> > + tst_obj_lt05()
> > + else + stop("Sensor test data not available, yet.\n")
> > + }
> > >
> > >
> > > ### collection 1 level-1 -----
> > >
> > > ## landsat 8
> > > tst_obj_lc08 <- function() {
> > + path <- system.file("extdata", package = "satellite")
> > + files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names
> =
> > TRUE)
> > + satellite(files)
> > + }
> > >
> > > ## landsat 7
> > > tst_obj_le07 <- function() {
> > + path <- system.file("extdata", package = "satellite")
> > + files <- list.files(path, pattern = glob2rx("LE07*.TIF"), full.names
> =
> > TRUE)
> > + satellite(files)
> > + }
> > >
> > > ## landsat 5
> > > tst_obj_lt05 <- function() {
> > + path <- system.file("testdata/LT05", package = "satellite")
> > + files <- list.files(path, pattern = glob2rx("LT05*.TIF"), full.names
> =
> > TRUE)
> > + satellite(files)
> > + }
> > >
> > >
> > > ### precollection level-1 -----
> > >
> > > ## landsat 8
> > > tst_obj_lc8 <- function() {
> > + path <- system.file("testdata/LC8", package = "satellite")
> > + files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names =
> > TRUE)
> > + satellite(files)
> > + }
> > >
> > > ## landsat 7
> > > tst_obj_le7 <- function() {
> > + path <- system.file("testdata/LE7", package = "satellite")
> > + files <- list.files(path, pattern = glob2rx("LE7*.TIF"), full.names =
> > TRUE)
> > + satellite(files)
> > + }
> > >
> > >
> > > ### perform tests -----
> > >
> > > test_check("satellite")
> > == Skipped tests
> > ===============================================================
> > * empty test (12)
> >
> > == Failed tests
> > ================================================================
> > -- Error (test-extend.R:9:1): (code run outside of `test_that()`)
> > --------------
> > Error in `(function (classes, fdef, mtable) {
> > methods <- .findInheritedMethods(classes, fdef, mtable)
> > if (length(methods) == 1L) return(methods[[1L]])
> > else if (length(methods) == 0L) {
> > cnames <- paste0("\"", vapply(classes, as.character, ""), "\"",
> > collapse = ", ")
> > stop(gettextf("unable to find an inherited method for function %s
> > for signature %s", sQuote(fdef at generic), sQuote(cnames)),
> domain
> > = NA)
> > }
> > else stop("Internal error in finding inherited methods; didn't
> return a
> > unique method", domain = NA)
> > })(list(structure("Satellite", package = "satellite")),
> > new("standardGeneric", .Data = function (x, y, ...)
> > standardGeneric("extend"), generic = structure("extend", package =
> "terra"),
> > package = "terra", group = list(), valueClass = character(0),
> signature
> > = c("x", "y"), default = NULL, skeleton = (function (x, y, ...)
> > stop("invalid call in method dispatch to 'extend' (no default method)",
> > domain = NA))(x, y, ...)), <environment>)`: unable to find an inherited
> > method for function 'extend' for signature '"Satellite"'
> > Backtrace:
> > x
> > 1. \-terra::extend(sat, ext_ggs) test-extend.R:9:0
> > 2. \-(function (classes, fdef, mtable) ...
> >
> > [ FAIL 1 | WARN 0 | SKIP 12 | PASS 139 ]
> > Error: Test failures
> > Execution halted
> > autopkgtest [20:13:13]: test run-unit-test
> >
> >
>
>
>
>
> > _______________________________________________
> > R-pkg-team mailing list
> > R-pkg-team at alioth-lists.debian.net
> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/r-pkg-team
>
>
> --
> http://fam-tille.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/r-pkg-team/attachments/20211203/8f2d0831/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debian_problem_satellite.R
Type: application/octet-stream
Size: 4223 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/r-pkg-team/attachments/20211203/8f2d0831/attachment-0001.obj>
More information about the R-pkg-team
mailing list