-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
JSON library as a git submodule #2088
Comments
This is odd, because we just recently in #2081 removed the test data from the develop branch. A shallow checkout is now just 6 MB:
|
I'm not sure if I can configure depth of the clone on CI... Full clone is massive still.
|
Looks like the repo is huge because of history. The repo size is 11MB while the size of the So |
I believe new git tag is needed now instead of 3.7.3. |
There will be a new tag once version 3.8.0 is released which should happen this month. I will also investigate how to remove the large files from the git history. |
Have you tried using shallow submodules? |
No, I haven't. Thanks for pointing me out. Looks like in git 2.14.1+ this feature is broken. See "Summary of buggy / unexpected / annoying behaviour as of Git 2.14.1" answer. |
It seems that it is discussing two specific cases relating to checking out a custom branch/commit of the submodule. Given the length of discussions (especially the first answer), I understand that shallow submodules are probably brittle and might fail in some cases, but in your use-case it might solve the problem. |
I tried to apply I guess it is because I stick submodules to tags (== hash). Thus git has to download entire history to find that hash. Or I use it incorrectly. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There's exactly one way to remove large files from history. Well, two ways if you count "do a shallow clone". You will need to use the If you're interested in doing this, don't hesitate to ping me with questions. |
Thanks for letting me know. I did a brief research and also found the mentioned downsides in removing large files from the history. Right now, I am more than hesitant to break existing tags and hashes, and hope that submodule get a nicer support for shallow clones. |
I believe the least intrusive way would be to start a new repository on GitHub (e.g. Even such a change, which would not be disruptive for the users, needs careful consideration and only might be carried out on a major release (e.g. 4.0.0), if ever. |
The library nlohmann/json has extremely fat Git history which makes e.g., recursive clones very slow, see nlohmann/json#2088. In this patch we replace the Git submodule with vendored sources from nlohmann/json-3.10.5.
The library nlohmann/json has extremely fat Git history which makes e.g., recursive clones very slow, see nlohmann/json#2088. In this patch we replace the Git submodule with vendored sources from nlohmann/json-3.10.5.
In order to use
nlohmann/json
as a submodule of another project it would be great to have a small subset of the JSON project without unit tests, documentation and benchmarks.The size of the v3.7.3 is 252MB while the size of the
include
folder is 800k. It takes time to download the library on CI if you build from scratch.As a workaround one can download zip file and put include folder only.
The text was updated successfully, but these errors were encountered: