> On 29 Dec 2015, at 10:54 AM, Philippe Hausler wrote:
>
> It is ok on the special types; those are harder than they may seem… NSValue
> in Darwin has some limitations like that especially when it comes to secure
> coding or non standard aligned values.
I have a solution
I’ve written a few unit tests for NSKeyedArchiver/NSKeyedUnarchiver but it
could do with lots more (if anyone is interested!). We are gated by some
methods not having isEqual() implementations yet (which is used to verify the
test results).
The tests pass on both Linux and OS X, although
> On 27 Dec 2015, at 3:45 AM, Philippe Hausler wrote:
>
> Totally reasonable since that is a limitation that will cause subclassers to
> not be able to implement that even outside of Foundation.
>
> What would help most for unit testing what you have so far?
>
> I have a
> On 24 Dec 2015, at 9:37 AM, Jordan Rose wrote:
>
> No, we cannot encode things "non-mangled but with the namespace". For any
> type other than top-level non-generic class types, using a non-mangled name
> is not unique. The only correct answer for arbitrary classes is
NSCoding will have to use something to transform from strings to classes, and
that satisfy the two cases (or more) that we have already shown, currently
there is no thing that does that in either form; either mangled or non mangled.
Basically we need something to implement NSClassFromString
> On 22 Dec 2015, at 5:50 AM, Jordan Rose wrote:
>
> IMHO on Linux NSKeyedArchiver should always use mangled names. If we want
> cross-platform archives, we should set up standard substitutions, but given
> that Swift classes exposed to Objective-C are archived with
To clarify the goals: I think it is reasonable for us to have a goal to be able
to encode/decode archives from foreign targets; e.g. linux encodes an archive
and mac os x decodes or iOS encodes and linux decodes. This will allow for
server architecture to transmit binary archives across the
Some work on NSKeyedArchiver below:
https://github.com/lhoward/swift-corelibs-foundation/tree/lhoward/nscoding
Very incomplete (most classes don’t have coders, there is no unarchiver,
inexperienced Swift programmer).
— Luke
___
swift-corelibs-dev
Somewhat; the mangled symbols are technically searchable by dlsym but that
seems like a hack. Perhaps one of the stdlib/compiler team might be able to
speak more on this than myself and they may have suggestions for a better way.
Foundation is at a special spot in which we can sometimes get
Hi All,
I’ve noticed that for many classes in Foundation, encodeWithCoder and
init?(coder aDecoder: NSCoder) call NSUnimplemented. Are these methods that
just haven’t been implemented yet, or are we not interested in implementing
these moving forward? Apologies if this has already been
10 matches
Mail list logo