Closed rafiki270 closed 6 years ago
CI is here https://ci.liveui.io/job/LiveUI/job/XMLCoding/ mac mini will be up again tomorrow as I had hdd replaced for an SSD and the whole thing reformatted so need to setup access to it again
Also, the tests only work sometimes as the <Result />
is sometimes at the bottom of the generated xml and sometimes at the beginning :( ... maybe we should separate the encode/decode tests somehow
It looks like the main problem is caused by the different behavior in bridging with the NS* types on Linux vs Mac. This is causing the serializer to silently ignore most of the type hierarchy as it expecting an NSDictionary but is getting a [AnyHashable: Any] Swift Dictionary.
I have put some changes on the linuxEncodingTest branch which essentially replaces the use of NS* types with native Swift types. I have also fixed the ordering problem you mentioned in the tests by de-serializing the results back out to types before comparing them. I have confirmed the unit tests now pass using the docker script. Requires some additional testing. Let me know what you think.
haven't had a time to test yet but looks really good in GH ... would you please mind making a PR so we can see what the CI thinks? also, you can now merge PR's and stuff but let's get into the habit of approving each others PR's first
Sorry for the delay. I wanted to add some unit tests which I have now created a PR for. Looks like you have merged my previous changes though.
Not sure why the code doesn't encode stuff properly on Linux
To see the results (if you got docker) try
./scripts/docker-shortcuts/test.sh
Does it makes any sense to you @tachyonics? Also, would you mind getting connected on the the LiveUI slack or Vapor Discord so we don't have to chat through PR's & issues? :)