Skip to content

Error and crashes of autotest::autotest_package #89

@KlausVigo

Description

@KlausVigo

Hello,

I try to run autotest::autotest_package("phangorn") and either this kills the RStudio session or I get different error messages.
The number of examples and .Rd files it tries to extract information seem also to differ, e.g. adding or deleting S3 methods on the fly.
I only can pinpoint it down to Rd file which document several functions or contain S3 methods. roxygen2 seems to change these files also for whatever reason frequently.

> autotest::autotest_package("phangorn")
★ Extracting example code from 66 .Rd files
  |===========================================================================| 100%
✔ Extracted example code
★ Converting 26 examples to yaml
  |===========================================================================| 100%
✔ Converted examples to yaml

── autotesting phangorn ──

✔ [1 / 30]: add.tips
✔ [2 / 30]: as.splits
✔ [3 / 30]: Ancestors
✔ [4 / 30]: allTrees
✔ [5 / 30]: as.ancestral
✔ [6 / 30]: as.networx
✔ [7 / 30]: cladePar
✔ [8 / 30]: coalSpeciesTree
✔ [9 / 30]: dfactorial
✔ [10 / 30]: discrete.gamma
✔ [11 / 30]: dist.p
✔ [12 / 30]: getClans
✔ [13 / 30]: getDiversity
Fehler in strsplit(yaml2[grep(ystr, yaml2)], ystr)[[1]] : 
  Indizierung außerhalb der Grenzen

or without "as.ancestral"

> at <- autotest::autotest_package("phangorn")
★ Extracting example code from 66 .Rd files
  |===========================================================================| 100%
✔ Extracted example code
★ Converting 25 examples to yaml
  |===========================================================================| 100%
✔ Converted examples to yaml

── autotesting phangorn ──

✔ [1 / 29]: add.tips
✔ [2 / 29]: as.splits
✔ [3 / 29]: Ancestors
✔ [4 / 29]: allTrees
✔ [5 / 29]: as.networx
✔ [6 / 29]: cladePar
✔ [7 / 29]: coalSpeciesTree
✔ [8 / 29]: dfactorial
✔ [9 / 29]: discrete.gamma
✔ [10 / 29]: dist.p
✔ [11 / 29]: getClans
✔ [12 / 29]: getDiversity
Fehler in strsplit(yaml2[grep(ystr, yaml2)], ystr)[[1]] : 
  Indizierung außerhalb der Grenzen

Ad here is the output of traceback():

> traceback()
11: is.factor(x)
10: gsub("^\\s+", "", strsplit(yaml2[grep(ystr, yaml2)], ystr)[[1]][2])
9: parse_one_fn(x, f, yaml)
8: parse_yaml_template(yaml = yaml, filename = filename)
7: autotest_single_yaml(i, filename, test, test_data, quiet)
6: FUN(X[[i]], ...)
5: lapply(yaml, function(i) autotest_single_yaml(i, filename, test, 
       test_data, quiet))
4: autotest_yaml(yaml = yaml, test = test, test_data = test_data, 
       quiet = TRUE)
3: rbind(deparse.level, ...)
2: rbind(res, autotest_yaml(yaml = yaml, test = test, test_data = test_data, 
       quiet = TRUE))
1: autotest::autotest_package("phangorn")

Kind regards,
Klaus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions