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
I am trying to use drat to expose private packages into our organization internal GitHub.
I am working on Windows and I had a "nice time" trying to validate the repository created locally but finally I managed.
I am raising this for your own amusement and also as this could be nice to maybe document so that the next guy don't waste hours like I did while trying to test the local repository ^_^
On Drat git repo session
drat::insertPackage("c:/fullpath/using/forward/slashes/package.tar.gz",
repodir= getOption("dratRepo", "c:/forward/slashed/path/git/docs"))
# source package added as expected, in src\contrib and index createddrat::insertPackage("c:/fullpath/using/forward/slashes/package.zip",
repodir= getOption("dratRepo", "c:/forward/slashed/path/git/docs"))
# binary package added as expected, in bin\windows\contrib\4.2 and index created
Using separate R session,
Using forward slashes path with verbose flag set [FAILURE]
# using forward slashes path
install.packages("mypackage", repos="c:/Users/myuser/source/work/r/drat-repo/git/docs", verbose=TRUE)
# fails with outputInstallingpackageinto ‘C:/Users/myuser/source/work/r/fresh/renv/library/R-4.2/x86_64-w64-mingw32’
(as ‘lib’ isunspecified)
Warning:unabletoaccessindexforrepositoryc:/Users/myuser/source/work/r/drat-repo/git/docs/src/contrib:cannotopenURL'c:/Users/myuser/source/work/r/drat-repo/git/docs/src/contrib/PACKAGES'Warning:unabletoaccessindexforrepositoryc:/Users/myuser/source/work/r/drat-repo/git/docs/bin/windows/contrib/4.2:cannotopenURL'c:/Users/myuser/source/work/r/drat-repo/git/docs/bin/windows/contrib/4.2/PACKAGES'Warningmessage:package ‘mypackage’ isnotavailableforthisversionofRAversionofthispackageforyourversionofRmightbeavailableelsewhere,
seetheideasathttps://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Then using backward slashes path and verbose flag set [FAILURE]
# using forward slashes path
install.packages("mypackage", repos="c:\\Users\\myuser\\source\\work\\r\\drat-repo\\git\\docs", verbose=TRUE)
# fails with outputInstallingpackageinto ‘C:/Users/myuser/source/work/r/fresh/renv/library/R-4.2/x86_64-w64-mingw32’
(as ‘lib’ isunspecified)
Warning:unabletoaccessindexforrepositoryc:\Users\myuser\source\work\r\drat-repo\git\docs/src/contrib:cannotopenURL'c:\Users\myuser\source\work\r\drat-repo\git\docs/src/contrib/PACKAGES'Warning:unabletoaccessindexforrepositoryc:\Users\myuser\source\work\r\drat-repo\git\docs/bin/windows/contrib/4.2:cannotopenURL'c:\Users\myuser\source\work\r\drat-repo\git\docs/bin/windows/contrib/4.2/PACKAGES'Warningmessage:package ‘mypackage’ isnotavailableforthisversionofRAversionofthispackageforyourversionofRmightbeavailableelsewhere,
seetheideasathttps://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
More or less same output but we can see that output warnings contains path with backward slashes
Then, using backward slashes path and the file: prefix, still with verbose flag set [SUCCESS but without dependencies]
Interesting. I think when you want a file path you actually must prefix it with file:// as you did (and I am unsure about the slashes). This comes from R, and possibly the Windows C library. We can possibly experiment a little more, and I think this is mostly a documentation issue. Thanks for posting!
No worries, thanks for your prompt feedback.
That's most likely not a drat issue per say, but I thought it could be interesting for you to know, play with and document.
I was quite disappointed by this VERBOSE flag side effect and almost as much by pak which is usually quite handy.
Please close this ticket when you think it is right.
I have another issue related to GitHub permissions that I am not able to figure out, so I'll create another ticket to keep both asides :)
Hi.
I am trying to use drat to expose private packages into our organization internal GitHub.
I am working on Windows and I had a "nice time" trying to validate the repository created locally but finally I managed.
I am raising this for your own amusement and also as this could be nice to maybe document so that the next guy don't waste hours like I did while trying to test the local repository ^_^
On Drat git repo session
Using separate R session,
Using forward slashes path with verbose flag set [FAILURE]
Then using backward slashes path and verbose flag set [FAILURE]
More or less same output but we can see that output warnings contains path with backward slashes
Then, using backward slashes path and the file: prefix, still with verbose flag set [SUCCESS but without dependencies]
Then cherry on the cake, using any of the 3 previous path formats and verbose flag not set like
All goes well, including install of dependencies [PARTY TIME]
In case this would interest you as well, while trying to use pak with any of the paths it fails :(
Thanks already for reading this quite long post ^_^
The text was updated successfully, but these errors were encountered: