-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git remotes fail if the repository contains a submodule #354
Comments
git remotes indeed do not support submodules. |
Ah, I didn't realize this was intentional. Is this something The particular package that prompted the error doesn't even require the submodule to build (it's excluded via At least for this narrow use case, tracking which packfile elements can't be unpacked and suppressing issues when they're |
Hi there, I have a C++ library with separate R and python bindings, all within the same organization. The C++ code is included in the R package as a submodule. Installation from GitHub works fine with Is there a "best practice" way to let my R package depend on C++ code from another repo that plays nicely with Thank you in advance! |
Quick update (in case anyone else with a similar project structure stumbles upon this thread), the workaround is in fact remarkably simple and doesn't have anything to do with
|
git remotes now support submodules, but it is opt in via a config value. Do you think it should be the default? We can also keep it opt-in now, and make it the default later? |
I'll let @dgkf weigh in as well, but I think it's probably fine to make it opt-in as long as it's clearly documented. Seems like only a handful of us are asking about it on Github issues. |
# pak 0.8.0 * `pkg_deps()` now accepts a vector of package names. * The metadata cache now does not use source URLs for packages in `Archive` on Posit Package Manager repositories. This URLs may serve a different package, even a source package when the main URL for the same package serves a binary package. The alternative URLs are not needed on PPM, anyway, because PPM is in a consistent state w.r.t. metadata and package files (#623). * pak now supports `gitlab::` package sources better, by adding explicit syntax to specify subdirectories (r-lib/pkgdepends#353, @dgkf). * `gitlab::` and `git::` package sources now support git submodules if the `git-submodules` configuration option is set to `TRUE`. See `?"pak-config"` (r-lib/pkgdepends#354). * The new `?ignore-unavailable` parameter makes it easy to ignore soft dependencies that are unavailable (#606). * pak now automatically ignores soft dependencies that have an incompatible OS type (`OS_type` entry in `DESCRIPTION`) when installing packages. * `repo_add()` and the `ppm_*()` functions, e.g. `ppm_snapshots()`, now work again after the PPM API changes (r-lib/pkgcache#110, r-lib/pkgcache#115). # pak 0.7.2 * pak now supports using parameters for all packages with the `*=?<param>` form. E.g. `*=?source` installs all packages from source. * pak now supports R 4.4.0 again, and also Rtools44.
When trying to download a package from a git repo that contains a submodule, I'm encountering an error arising from an attempt to write out an object that doesn't exist from the downloaded git files:
pkgdepends/R/git-protocol.R
Line 549 in 2dffed6
Debugging this line, the error occurs when
opath
is the path to the submodule, resulting in aparsed[..]
that returnsNULL
.The text was updated successfully, but these errors were encountered: