Bug#892153: Objective-C libraries (was: Bug#892153: marked as done (RFS: addresses-for-gnustep/0.4.8-3 [RC]))
Adam Borowski wrote:
> On Tue, Mar 06, 2018 at 08:28:17AM +0200, Yavor Doganov wrote:
> > * Package name : addresses-for-gnustep
> > Version : 0.4.8-3
> I don't understand ObjC library stuff well enough to adequately
> check these parts, but it's unlikely we'd get someone else who can
> review this... and you know what you're doing.
I'd be happy to explain the changes that raise questions.
I guess you refer to dropping the symbols files? If so, please take a
look at lintian #749202. If it's still unclear, let me give an
example with the smallest class in the Addresses framework:
@interface ADPublicAddressBook: ADAddressBook
{
BOOL _readOnly;
ADAddressBook *_book;
}
- initWithAddressBook: (ADAddressBook*) book
readOnly: (BOOL) ro;
@end
The symbol is just __objc_class_name_ADPublicAddressBook@Base. Now,
imagine if a new upstream version 0.4.9 adds another instance method
-doSomething which is an API addition. This API addition will not be
reflected in the symbols file and apps using the new -doSomething
method will still pick up the lax dependency on 0.4.6. And as a
result will get an NSInvalidArgument exception (abort) if run with an
older version of the library. This totally defeats the purpose of
using symbols files, which as I understand it is an enhancement of the
shlibs system to provide fine-grained dependencies. Not only that
they are not fine-grained, they are simply wrong in this case.
If -initWithAddressBook:readOnly: is removed in a new version of the
library, that's an API/ABI break but again, it won't be reflected in
the symbols table. In a C/C++ library you'll see a symbol
disappearing but it won't happen here. So even the secondary reason
for using symbols files (detecting ABI breaks, although that's really
a weak test) is not applicable.
There's also the case that private classes and class categories also
get their own symbols (as there is no concept for "private" in
Objective-C, everything is exposed to the ObjC runtime). These will
trigger spurious additions/removals of symbols when no public API is
involved at all.
> Uploaded.
Many thanks for sponsoring.
Reply to: