[swift-users] "swift package describe" performs fetch

Toni Suter tonisuter at me.com
Thu Apr 6 10:40:46 CDT 2017


Hi everyone,

I would like to obtain detailed information about a package and all its dependencies in an automated fashion. At first I thought that the
two commands "swift package describe" and "swift package show-dependencies" are a perfect fit for that. More concretely,
I wanted to perform the following commands:

1. Execute the command "swift package fetch" to make sure that all dependencies are downloaded

2. Execute the command "swift package show-dependencies --format json" to obtain a description of
each package (i.e., name, path, etc.) as well as the dependency relationship between the packages.

3. For each package, do the following to obtain information about the modules in that package:
	cd path-of-package
	swift package describe --type json

However, if a package has dependencies, the command "swift package describe --type json" will perform another fetch.
I am not sure why this is necessary since the output of that command only contains information about the individual modules of
the package. Unfortunately, this means that the same dependencies are downloaded multiple times if a package's dependencies have
themselves further dependencies, which makes the process above quite slow. Is this a bug or is there another way to retrieve the same information?

Thanks and best regards
Toni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170406/e31f0a5b/attachment.html>


More information about the swift-users mailing list