[swift-build-dev] Override Sub-dependency

matthew at bluedino.net matthew at bluedino.net
Wed Sep 27 10:45:46 CDT 2017

I did a quick search to see if this had already been discussed. My  
apologies if I missed something.

I think it would be useful to be able to override sub-dependencies.

So, for example, suppose I am writing an application that depends on  
Vapor. Now Vapor has a dependency on  
https://github.com/vapor/routing.git which provides a target package  

Now suppose I would like to replace the Routing package with my own  
implementation. As best I can tell, the only way I can do this is to  
fork Vapor in order to replace the dependency in Vapor’s Package.swift.

It seems to me that the root of the problem is that packages are  
specified by their hosted location. I know that this introduces more  
complexity, but I would recommend separating the unique identifier  
that specifies a package from where the package is found.

There’s a second problem this solves— as it stands now, if I have to  
change where my package is hosted, that potentially breaks a lot of  
other software.



Matthew M. Burke
matthew at bluedino.net

More information about the swift-build-dev mailing list