r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.37k stars 753 forks source link

check_mac_release prints its output twice #2416

Closed BartJanvanRossum closed 2 years ago

BartJanvanRossum commented 2 years ago

When running check_mac_release its output it printed twice to the console. This happens for me for all packages.

The easiest way to replicate is in RStudio: File - New project - New directory - R Package - name the package - Create Project

For this newly created package run check_mac_release.
This gives the following output in the console: image

The check itself is done only once as far as I can tell. I only get a single mail with the results, so it seems the problem is just in the printed output.

This double printing only happens for check_mac_release. check_win_release/check_win_devel only print their output once.

Using RStudio 2022.02.0+443 "Prairie Trillium" Windows 10 R 4.1.3 devtools 2.4.3

ahjota commented 2 years ago

I also get this issue on MacOS.

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.5
[snip]
other attached packages:
[1] devtools_2.4.3 usethis_2.1.3 

The function actually builds the package at "." twice, once because it's the default value for the pkg arg, and once because it's the default value for the dep_pkgs arg.

You can work around this by invoking devtools::check_mac_release(".", dep_pkgs = c()) but I don't know what the proper fix for this is.

stla commented 2 years ago

I came here to report the same issue (R 4.1.2, Windows 10). Moreover, this error is thrown:

Error: [ENOENT] Failed to remove 'C:/Users/sdl96354/AppData/Local/Temp/RtmpSSbJV7/RCGAL_0.0.9004.tar.gz': no such file or directory

But the check is working.

jennybc commented 2 years ago

I believe I discovered this a while ago and it's fixed in dev: https://github.com/r-lib/devtools/commit/91a8758d8227be3eda0e6875dc434ffedd7608d2