The problem:
I'm using the nlohmann/json package with Swift Package Manager. Package.swift manifest file
By looking at the package manifest, it's clear that the library includes just a single file and a header. However, in order to install the package, Swift Package Manager clones the whole repository which is over 300 MB in size.
Potential solution
Using shallow clone will resolve the issue. Is it possible to use shallow clone with Swift Package Manager? Interested in both Xcode and Command line solutions.
Relevant links
Firebase team's solution: fork the "offending" dependency repositories