Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace UnkeyedBox with Array, refine KeyedStorage #102

Merged
merged 11 commits into from May 22, 2019
Merged

Conversation

MaxDesiatov
Copy link
Collaborator

@MaxDesiatov MaxDesiatov commented May 13, 2019

UnkeyedBox is a wrapper for [Box], the assumption is that adding direct Box conformance to [Box] would simplify things a bit. Also, KeyedStorage now always stores [Box] per key without any special handling for single items per key to simplify this even more. In addition, order of values is preserved for all keys as required for #91 and #25.

This should also unblock #101 providing unified handling for elements without any content and attributes.

By pure serendipity this also fixes tests introduced in #38.

@codecov
Copy link

codecov bot commented May 21, 2019

Codecov Report

Merging #102 into master will decrease coverage by 1.35%.
The diff coverage is 75.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage   77.12%   75.77%   -1.36%     
==========================================
  Files          38       38              
  Lines        2120     2039      -81     
==========================================
- Hits         1635     1545      -90     
- Misses        485      494       +9
Impacted Files Coverage Δ
Sources/XMLCoder/Auxiliaries/Metatypes.swift 100% <ø> (ø) ⬆️
Sources/XMLCoder/Auxiliaries/Box/UnkeyedBox.swift 100% <ø> (ø) ⬆️
...rces/XMLCoder/Decoder/DecodingErrorExtension.swift 0% <0%> (-65.22%) ⬇️
Sources/XMLCoder/Auxiliaries/KeyedStorage.swift 100% <100%> (+1.19%) ⬆️
Sources/XMLCoder/Auxiliaries/Box/SharedBox.swift 100% <100%> (ø) ⬆️
Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift 97.17% <100%> (ø) ⬆️
...urces/XMLCoder/Encoder/XMLReferencingEncoder.swift 58.97% <100%> (ø) ⬆️
Sources/XMLCoder/Auxiliaries/Box/KeyedBox.swift 100% <100%> (ø) ⬆️
...XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift 32.41% <27.27%> (-5.17%) ⬇️
...es/XMLCoder/Decoder/XMLDecoderImplementation.swift 61.98% <56.81%> (-0.57%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb203a4...f36d3a0. Read the comment docs.

@CoreOffice CoreOffice deleted a comment from codecov bot May 21, 2019
@MaxDesiatov MaxDesiatov marked this pull request as ready for review May 21, 2019 13:05
@MaxDesiatov MaxDesiatov requested a review from hodovani May 21, 2019 13:05
hodovani
hodovani previously approved these changes May 21, 2019
@MaxDesiatov MaxDesiatov merged commit a673912 into master May 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the remove-unkeyed branch May 22, 2019 07:23
arjungupta0107 pushed a commit to salido/XMLCoder that referenced this pull request Jun 26, 2020
`UnkeyedBox` is a wrapper for `[Box]`, the assumption is that adding direct `Box` conformance to `[Box]` would simplify things a bit. Also, `KeyedStorage` now always stores `[Box]` per key without any special handling for single items per key to simplify this even more. In addition, order of values is preserved for all keys as required for CoreOffice#91 and CoreOffice#25.

This should also unblock CoreOffice#101 providing unified handling for elements without any content and attributes.

By pure serendipity this also fixes tests introduced in CoreOffice#38.

* Replace UnkeyedBox with Array, refine KeyedStorage
* Fix more of the broken tests
* One unfixed test left in benchmarks
* Single out failing benchmark in a separate test
* Fix all tests 🎉
* Fix compiler warning
* Fix Xcode 10.1 compilation error
* Remove unused AnyArray protocol
* Remove unused elementType function
* Simplify code to improve test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants