-
Notifications
You must be signed in to change notification settings - Fork 27
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
Recursive GitHub clones on packages? #41
Comments
Cget never calls
Finally, if neither of those are options, you can clone or download the missing pieces in cmake. You can create a cmake file('build.cmake') which does something like this: # Clone the submodules manually
execute_process(COMMAND git clone -b master [email protected]:pfultz2/cget.git ${CMAKE_CURRENT_SOURCE_DIR}/cget)
# Include the original cmake file
include(${CGET_CMAKE_ORIGINAL_SOURCE_FILE}) And install the library with |
Hey, thanks for the info! In this case the I've created a pull-request on the cget-recipes repo for my new recipe here: |
What about adding a switch that tells |
No not directly, as cloning is much slower and when cloning recursively there isn't a simple way to shallow clone the submodules. I will probably add a way to add git urls(like
An open-source project should provide source tarballs for release, it doesn't necessarily need to be from github. Furthermore, submodules are usually used as a poor-dependency management, which requires the user to download the dependency multiple times when used in multiple projects. And this is the case when the user installs both metal and alloy. Instead, the cmake-utils should be made installable and found by |
Right, but the user get's what the user asks for.
For standalone header only libraries I argue that there is no clear definition for a source release, indeed for Metal it could be argued that the
I agree in general, but you can also think of cmake utilities as a private implementation detail, not a public dependency. For instance, the repository I set up as a submodule only contains undocumented helpers that work for me and I don't want to ship them publicly to users. I also don't want to maintain multiple copies of it as part of different projects, so I do think in this case submodules are fine and github ought to better support them. Do you happen to know whether one can omit the tarballs automatically generated by Github on releases? I'd love to provide my own that bundles the submodule, but it hardly does any good to upload them besides the ones already listed there. |
Right, which supporting
It could be, but its also nice for libraries(even header-only) to provide
Its a build-only dependency, which can be expressed with cget in a requirements.txt file with
Its still a dependency even when using submodules. Its just now the user has to download this dependency multiple times, instead of using a dependency tool to manage it.
Hmm, I don't know, what happens if you try to upload a file with same name?
Yea, but having them available even with github's broken tarballs is better than not having them at all. |
Thanks for your insight, in fact your feed back made me rethink this whole submodule nonsense! It turns out I figured out a way to achieve exactly what I needed, that is, share cmake implementation details between several projects, without the need for submodules, but using subtrees instead. It's great because users need never know anything about shared implementation details and, because of that, integration with github and hence with |
Hi,
I'm trying to create/install a package from a GitHub repo (that I do not own). The repo already uses CMake as its build system, so that's a positive start at least.
However, it seems the repo also uses git submodules, and therefore expects to have been cloned using the
--recursive
flag so that its submodule dependencies are also cloned.Is there any way of telling cget to do a full recursive clone of the repo, instead of (I believe) downloading the zip archive (which does not include any submodules)?
If not, do you have any suggestions on an alternative approach I could try?
Thanks!
The text was updated successfully, but these errors were encountered: