> On Dec 20, 2017, at 10:17 PM, Adam Kemp via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Should there be some kind of diagnostic if you have an @abiPublic definition 
> that is never referenced by any @inlinable function? I can imagine that there 
> might be tools to check that a new build of a module doesn’t break binary 
> compatibility by verifying that you didn’t remove any @abiPublic symbols, but 
> what if you never meant to and never needed to export that symbol in the 
> first place? How do we prevent that from happening?

>From a technical standpoint it would be possible to implement such a 
>diagnostic, with the caveat that it would probably only work in whole module 
>optimization mode. However, you’re right that there’s a complication here:

> Perhaps a diagnostic like this would cause problems if you started with an 
> @inlinable function that called an @abiPublic function and then in a 
> subsequent version of your module you modified the @inlinable function such 
> that it no longer calls the @abiPublic function. You would still need to keep 
> that @abiPublic function to support clients that had inlined the old version, 
> right?

This is correct; you may well end up with newer versions of a library that 
carry @abiPublic symbols only for compatibility reasons.

> Maybe this could be built into the hypothetical binary compatibility checker. 
> If there is no previous version or if the previous version didn’t have the 
> symbol and it’s never referenced then it’s an error. Would that work? Am I 
> overthinking this?

Yes, that would certainly be possible. We’ve discussed having an “ABI differ” 
tool as something we would really like to have, but so far no concrete design 
has been proposed. I expect this discussion will take on a greater urgency once 
we get close to shipping the second version of an “ABI stable” standard 
library. It’s obviously not needed the first time around.

Slava

> 
> On Dec 20, 2017, at 4:19 PM, Ted Kremenek via swift-evolution 
> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:
> 
>> The review of "SE-0193 - Cross-module inlining and specialization" begins 
>> now and runs through January 5, 2018.
>> 
>> The proposal is available here:
>> 
>> https://github.com/apple/swift-evolution/blob/master/proposals/0193-cross-module-inlining-and-specialization.md
>>  
>> <https://github.com/apple/swift-evolution/blob/master/proposals/0193-cross-module-inlining-and-specialization.md>
>> Reviews are an important part of the Swift evolution process. All review 
>> feedback should be sent to the swift-evolution mailing list at:
>> 
>> https://lists.swift.org/mailman/listinfo/swift-evolution 
>> <https://lists.swift.org/mailman/listinfo/swift-evolution>
>> or, if you would like to keep your feedback private, directly to the review 
>> manager. 
>> 
>> When replying, please try to keep the proposal link at the top of the 
>> message:
>> 
>> Proposal link: 
>> https://github.com/apple/swift-evolution/blob/master/proposals/0193-cross-module-inlining-and-specialization.md
>>  
>> <https://github.com/apple/swift-evolution/blob/master/proposals/0193-cross-module-inlining-and-specialization.md>
>> ...
>> Reply text
>> ...
>> Other replies
>> What goes into a review of a proposal?
>> 
>> The goal of the review process is to improve the proposal under review 
>> through constructive criticism and, eventually, determine the direction of 
>> Swift. 
>> 
>> When reviewing a proposal, here are some questions to consider:
>> 
>> What is your evaluation of the proposal?
>> 
>> Is the problem being addressed significant enough to warrant a change to 
>> Swift?
>> 
>> Does this proposal fit well with the feel and direction of Swift?
>> 
>> If you have used other languages or libraries with a similar feature, how do 
>> you feel that this proposal compares to those?
>> 
>> How much effort did you put into your review? A glance, a quick reading, or 
>> an in-depth study?
>> 
>> Thanks,
>> Ted Kremenek
>> Review Manager
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution@swift.org <mailto:swift-evolution@swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution 
>> <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org <mailto:swift-evolution@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution 
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to