[swift-evolution] [Review] SE-0075: Adding a Build Configuration Import Test

Pyry Jahkola pyry.jahkola at iki.fi
Fri May 13 13:16:03 CDT 2016


> On 13 May 2016, Erica Sadun wrote:
> 
>> As per Pyry’s feedback, you could add a version:
>> 
>> #if import Frobnication(<1.7.3) // <- Only added version constraint here.
>> extension Knob : Frobnicatable { ... }
>> #endif
> 
> I have no problem with this but would need to defer to the build and language people to determine whether that's practical in today's Swift. Right now, there's a major-version mention in build packages but I'm not sure whether that information then propagates in a usable way. If it's possible, then yes, I'd rather add it in the initial design than as a later addition and I can extend Pyry's suggestion in "Future Directions".

I already gave my +1 on the original proposal and if `canImport` is indeed easiest to implement we should get it going now.

The `#if import Foo` blocks and conditional imports with version checks can easily be added at a later time without much complication or breakage, AFAICT. Good if you can include those in the "Future Directions" section.

> p.s. Also on my Swift Bucket list: "import as".

Splendid! I'd already forgotten about qualified imports and renaming! Those would be welcome additions too.

— Pyry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160513/9e170f04/attachment.html>


More information about the swift-evolution mailing list