【发布时间】:2022-01-02 10:28:00
【问题描述】:
我正在更新当前在 CRAN 上的软件包。在本地持续运行 devtools::check() 会给出警告
> checking package subdirectories ... WARNING
Found the following directory with the name of a version control directory:
These should not be in a package tarball.
./.git
和注意
> checking for hidden files and directories ... NOTE
Found the following hidden files and directories:
.git
These were most likely included in error. See section 'Package
structure' in the 'Writing R Extensions' manual.
CRAN-pack does not know about
.git
当我检查 winbuilder 时,我不再收到警告,但确实收到了提示。
这是我的 .Rbuildignore 文件,应该忽略 .git 文件夹,但由于某种原因(?)
^.*\.Rproj$
^\.Rproj\.user$
^cran-comments\.md$
^\.Rhistory$
^docs$
^\.travis\.yml$
^CRAN-RELEASE$
^\.git$
^\.github$
我最近从 Windows 迁移到 Mac(操作系统 12.1),我正在运行 R 版本 4.1.1 和 RStudio 版本 1.4.1717。感谢您的帮助 - 我无法弄清楚这一点,这让我发疯了。
编辑:为了重现性,我的包目前在 Github 上 https://github.com/mbtyers/riverdist
【问题讨论】:
-
在黑暗中刺痛,但是您是否将
.Rbuildignore中的行尾从 Windows 转换为 Mac 行尾? -
@Hobo 这听起来很有希望 - Mac 行尾是什么?
-
如果你忽略
.git会发生什么?它似乎适用于我的构建忽略。 -
@NelsonGon 我的 Buildignore 包括
^\.git$,你是这个意思吗? -
@NelsonGon
.git、^\.git、^git或^git$运气不好。^\git$在我安装和重启时抛出一个错误,这令人鼓舞,因为它开始认为我的 buildignore 被完全忽略了!
标签: r rstudio devtools r-package