[question] How to package libraries that contain git submodules?
See original GitHub issueUsing a zipped source of a library from github is not an option if it uses submodules as these are not provided in the zip. However by downloading as a zip we also lose the git metadata, so we can’t do a “git submodule update” from the recipes’ source
method.
How do you plan to deal with these cases?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Git - Submodules - Git SCM
Let's start by adding an existing Git repository as a submodule of the repository that we're working on. To add a new submodule...
Read more >Use Git Submodules to Manage Libraries - WikiLeaks
In your project, run the below submodule command to add a subdirectory to your project that will contain the submodule repository. git submodule...
Read more >Understanding and Working with Submodules in Git - SitePoint
Git has a lot of power under the hood. Learn about submodules in Git, including what they are, how they work, and why...
Read more >How do I use a Git submodule with a Composer loaded library?
I tried setting up vendor/stuff as a git submodule containing the package needed, and referencing it in the primary composer.json like this (ref):...
Read more >Project structure with git submodules with common ...
Using submodules for this is fine... but can be suboptimal, depending on what your priorities are, and what you value most. Think of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the submodules are libraries for which it is reasonable to package them on their own, we did ignore the submodules and provided the libraries as Conan dependencies in the past
Coming back to this issue, I think that trying to create recipes of git submodules in case those are C/C++ libraries is the correct way to go.
If any of that is not possible at the moment of the PR, maybe is better to ask the community for help or, if the recipe is already too complex or submodules are ony for internal use (embedded in the library), we might consider to include the recipe and develop it further in the future.
BTW, you can get a zip file from the source code of GitHub repo by its commit, for example https://github.com/pytorch/pytorch/archive/ff608a9.zip. A repo with submodules could point to the URLs of the submodules and recreate the sources’ layout in the same way a
git clone
with submodules would do it