You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a package have an item in Remotes section of DESCRIPTION with git::https://..., then it gets installed with RemoteType "git" via pak::local_install_dev_deps(). This causes issues with everything in devtools that depend on remotes (e.g. devtools::build_readme()), because remotes does not recognize git as a valid RemoteType (only git2r or xgit).
The issue is triggered when remotes:::package2remote() is called from devtools via remotes.
Here's the reprex of running pak and devtools from the remotes.pak.test2:
pak::local_install_dev_deps()
#> #> → Will install 1 package.#> → All 2 packages (0 B) are cached.#> + remotes.pak.test1 0.0.0.9000 [bld][cmp]#> ℹ No downloads are needed, 1 pkg is cached#> ✔ Installed remotes.pak.test1 0.0.0.9000 (git::https://github.com/banfai/remotes.pak.test1.git@3cfe256) (125ms)#> ✔ 1 dep: added 1 [4.5s]
devtools::build_readme()
#> ℹ Installing remotes.pak.test2 in temporary library#> Error in FUN(X[[i]], ...): can't convert package remotes.pak.test1 with RemoteType 'git' to remote
remotes:::package2remote("remotes.pak.test1")
#> Error in remotes:::package2remote("remotes.pak.test1"): can't convert package remotes.pak.test1 with RemoteType 'git' to remote
utils::packageDescription("remotes.pak.test1")
#> Package: remotes.pak.test1#> Title: What the Package Does (One Line, Title Case)#> Version: 0.0.0.9000#> Authors@R: person("First", "Last", , "[email protected]", role =#> c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID"))#> Description: What the package does (one paragraph).#> License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a#> license#> Encoding: UTF-8#> Roxygen: list(markdown = TRUE)#> RoxygenNote: 7.3.1#> NeedsCompilation: no#> Packaged: 2024-06-24 14:57:27 UTC; banfaib#> Author: First Last [aut, cre] (YOUR-ORCID-ID)#> Maintainer: First Last <[email protected]>#> Built: R 4.4.0; ; 2024-06-24 14:57:27 UTC; windows#> RemoteType: git#> RemoteUrl: https://github.com/banfai/remotes.pak.test1.git#> RemotePkgRef: git::https://github.com/banfai/remotes.pak.test1.git#> RemoteRef: HEAD#> RemoteSha: 3cfe256bac615c71382504674821e119a41aae07#> #> -- File: C:/R/R-4.4.0/library/remotes.pak.test1/Meta/package.rds
I'm not sure if this is a regression of pak, or an issue with remotes, but I didn't want to cross-post it there yet. Please let me know if a remotes issue would be more appropriate.
PS: the test example is a bit contrived, but a realistic usecase of git remote type is e.g. an internal repository on Github Enterprise.
The text was updated successfully, but these errors were encountered:
When a package have an item in Remotes section of DESCRIPTION with
git::https://...
, then it gets installed withRemoteType
"git" viapak::local_install_dev_deps()
. This causes issues with everything in devtools that depend on remotes (e.g.devtools::build_readme()
), because remotes does not recognizegit
as a validRemoteType
(onlygit2r
orxgit
).The issue is triggered when
remotes:::package2remote()
is called from devtools via remotes.I've made two test packages, banfai/remotes.pak.test1 and banfai/remotes.pak.test2 that depends on the former.
Here's the reprex of running
pak
anddevtools
from the remotes.pak.test2:Created on 2024-06-24 with reprex v2.1.0
I'm not sure if this is a regression of pak, or an issue with remotes, but I didn't want to cross-post it there yet. Please let me know if a remotes issue would be more appropriate.
PS: the test example is a bit contrived, but a realistic usecase of
git
remote type is e.g. an internal repository on Github Enterprise.The text was updated successfully, but these errors were encountered: