[swift-build-dev] Questions about the SwiftPM `--update`

Max Howell max.howell at apple.com
Fri Apr 1 18:39:59 CDT 2016


> I understand the SwiftPM don't support running `--fetch` twice in the current implementation.
> - https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160328/000380.html <https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160328/000380.html>
> 
> Then, can I ask any questions about `--update`?
> 
> Let's suppose the following situation:
> - `MyApp` depends on `PackageA` and `B`.
> - `PackageB` depends on `C`.
> 
> ```
> MyApp
> ├── Package A
> └── Package B
>     └── Package C
> ```
> 
> ##### Questions #####
> 
> 1. If `PackageA` requires update, then SwitPM should fetch `PackageA` only, or all packages?

—update updates everything

> 2. If `PackageB` requires update, then SwitPM should fetch both `PackageB` and `C`?

—update updates everything

> 3. if `PackageA-1.0.0` requires update to `2.0.0`, then SwiftPM shoud remain `PackageA-1.0.0` directory, or remove?

It depends on the Package.swift for MyApp. If it allows A to be 2.0, then it updates to 2.0, if not then it does not update to 2.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160401/1feb604b/attachment.html>


More information about the swift-build-dev mailing list