dlang / dub

Package and build management system for D
MIT License
677 stars 227 forks source link

dub local and remote archive dependency #1134

Open andre2007 opened 7 years ago

andre2007 commented 7 years ago

Please provide the functionality to specify local or remote archives as dependencies: { "name":"test" "dependencies":{ "sample1":{"path":"C:\\D\\projects\\test2\\sample1.zip", "sample2":{"url":"http://localhost:8080/sample2.zip" }, }

I built a pre processor to enable this functionaliy. You can find the source code here: http://forum.dlang.org/post/wnhqxopvkmjqjgobfjfa@forum.dlang.org

MartinNowak commented 7 years ago

We have zip support in the standard library, so it could easily be integrated without unzip. Functionality to unpack zip files is already there, storeFetchedPackage.

We'd basically have to code a new PackageSupplier, see https://github.com/dlang/dub/blob/68d4f51e7b903e547621b5e53a40434fe7874d8a/source/dub/dub.d#L718 for usage.

Not too sure about the liability to use unversioned dependencies, we could append the checksum of the archive as pseudo-version, similar to how Bundler uses git hashes for arbitrary repos.