Skip to content

Commit

Permalink
Update test advice a bit, remove note about urlchecker
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Dec 4, 2024
1 parent ef62b86 commit 34133f7
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ The state of cpp11 is pretty stable, it seems to have the features we need for m
### Running the cpp11test tests

Most of the test suite is in a sub-package, cpp11test.
Probably the best way to run these tests is to install the development version of cpp11 and then run `devtools::test()` to run the cpp11test test suite.
The best way to run these tests is to install the development version of cpp11 after any change, and then run `devtools::test("./cpp11test")`.
Precisely, this looks like:

```r
# Install dev cpp11, clean the cpp11test dll manually since it thinks nothing
# has changed, then recompile and run its tests.
devtools::install()
devtools::clean_dll("./cpp11test")
devtools::test("./cpp11test")
```

If tests failures occur the output from Catch isn't always easy to interpret.
I have a branch of testthat https://github.com/jimhester/testthat/tree/catch-detailed-output that should make things easier to understand.
Expand All @@ -17,25 +26,6 @@ In addition getting a debugger to catch when errors happen can be fiddly when ru

The GitHub Actions workflow has some additional logic to handle running the cpp11 tests https://github.com/r-lib/cpp11/blob/fd8ef97d006db847f7f17166cf52e1e0383b2d35/.github/workflows/R-CMD-check.yaml#L95-L102, https://github.com/r-lib/cpp11/blob/fd8ef97d006db847f7f17166cf52e1e0383b2d35/.github/workflows/R-CMD-check.yaml#L117-L124.

### False positive URL checks for git repositories in the vignettes

If you run `urlchecker::url_check()` on the repo you will see the following false positives.

```
! Warning: vignettes/motivations.Rmd:363:11 Moved
git clone https://github.com/r-lib/cpp11.git
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/r-lib/cpp11
! Warning: vignettes/motivations.Rmd:354:11 Moved
git clone https://github.com/RcppCore/Rcpp.git
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/RcppCore/Rcpp
>
```

These only happen with the urlchecker package, they can be safely ignored and the real CRAN checks will not show them.


## Ensure you use `Sys.setenv("CPP11_EVAL" = "true"); devtools::submit_cran()` when submitting.

If you forget to set `CPP_EVAL = "true"` then the vignette chunks will not run properly and the vignettes will not be rendered properly.
Expand Down

0 comments on commit 34133f7

Please sign in to comment.