question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How to package libraries that contain git submodules?

See original GitHub issue

Using 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:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
Croydoncommented, Sep 9, 2019

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

1reaction
danimtbcommented, Sep 16, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found