[swift-build-dev] Dependency consistency within package major version

Max Howell max.howell at apple.com
Tue Dec 15 14:49:03 CST 2015


> As you said, versioning is hard and these are the reasons why.
> 
> I am guessing that to be able to load two versions of the same module into the same process the package builder re-namespace one or both to avoid a collision and change the referencing modules.

Yes, it would be nice to get support from the language for this, so I will propose it to swift-core, hopefully something decent in the namespacing area will come of it.

> Something like this should work, the only concern is making sure you limit the amount of ‘black magic’ that is going on - make sure its clearly explained what the package builder is doing otherwise there might be side effects - such as the size of a binary increasing because there are now two versions of a sub-module present - that suddenly appear without explanation.

I dislike opaque systems, so I intend to shower warnings when the packages are initially cloned and this situation is discovered.

> I think the approach of warning on these issues is a good one - at most having them as errors that fail the build but then can be explicitly ignored (as its very easy for devs to take the ‘well it compiled, must be good’ approach and completely ignore warnings). In terms 'make doing the correct/common thing easy and the rest possible’ its rare that you’d actually want to outright prohibit something so your approach seems solid with respect to that.

We could explore erroring builds unless a —allow-this-stuff type flag is specified. I’m okay with this since IMO the developer should be encouraged to consider these situations carefully. But simultaneously if you make a tool that is tedious, people find alternatives. So we should tread carefully.

> I’m pretty excited by what I have seen so far with the package builder and it looks like its starting off with a good foundation. Let me know if there is anything I can contribute.

Great to hear! We’re very exited too and are really glad to get such excellent feedback! Thanks,

Max

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


More information about the swift-build-dev mailing list