DeclareDesign / estimatr

estimatr: Fast Estimators for Design-Based Inference
https://declaredesign.org/r/estimatr
Other
131 stars 20 forks source link

texreg generics issue #367

Closed graemeblair closed 3 years ago

graemeblair commented 4 years ago

On a single platform (r-devel-linux-x86_64-fedora-gcc), we get the following error. We have a few days to fix it before being booted from CRAN.

  ── Warning (test-zzz.R:10:3): onLoad makes generics if texreg is present ───────
  Created a package name, '2020-11-08 12:13:21', when none found

  ── ERROR (test-zzz.R:10:3): onLoad makes generics if texreg is present ─────────
  Error: cannot add bindings to a locked environment
  Backtrace:
      █
   1. ├─testthat::expect_null(.onLoad("estimatr", "estimatr")) test-zzz.R:10:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─.onLoad("estimatr", "estimatr")
   5. └─methods::setGeneric(...)
   6. └─methods:::.GenericAssign(name, fdef, where)
   7. └─base::assign(name, fdef, where)

Note from Ripley:

This error is affected by a package in Enhances, so is seen with _R_CHECK_SUGGESTSONLY=false, the default but not the setting for --as-cran.

See https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/estimatr-00check.html

graemeblair commented 4 years ago

I'm stumped so far! This on r-devel linux gcc but not the other linux setups.

nfultz commented 4 years ago

Able to repro on the rocker/r-devel image - but only through R CMD check.

devtools::test_file('test-zzz.R') does not error.

EDIT: I guess luke saw a related issue already, and added the broom tests to Rbuildignore ? can do the same for texreg.

graemeblair commented 4 years ago

Thanks @nfultz, adding to .Rbuildignore.