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

Encodable and Decodable support for choice elements #119

Merged
merged 35 commits into from Jul 30, 2019

Commits on Jul 27, 2019

  1. Add testing preliminaries for choice elements

    Add benchmark baselines
    
    Pull in tests (#11)
    
    Add Decoding support for choice elements (#15)
    
    Fix indentation (#16)
    
    Replace usage of XCTUnrwap (#19)
    
    Add nested choice tests (#18)
    
    Add falsely passing double array roundtrip test (#17)
    bwetherfield authored and jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    749e0fc View commit details
    Browse the repository at this point in the history
  2. Add ChoiceKey protocol conforming to CodingKey

    Add CodingKey conformance to ChoiceKey
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    ffbb395 View commit details
    Browse the repository at this point in the history
  3. Implement choice element encoding

    Add SingleElementEncodingContainer
    
    Fix def
    
    Expand ReferencingEncoder
    
    Complete SingleElementEncodingContainer
    
    Add decode-side hacks
    
    Add special diversion for SingleElementContainer
    
    Add hacky runtime bifurcation
    
    Add case for XMLEncoder
    
    Add SingleElementBox based XMLCoderElement initializer
    
    Change open permissions to public
    
    Add usage
    
    Add usage
    
    Add Nested cases within UnkeyedContainer
    
    Make use of SingleElementBox key
    
    Add UnkeyedBox of SingleElementBox fix
    
    Add static check for array of SingleElementBox type
    
    Implement nesting for keyed container
    
    Fix top level container func
    
    Implement nesting for SingleElementKeyed Container
    
    Clean up SingleElementBox initialization
    
    Fix formatting
    bwetherfield authored and jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    77f9699 View commit details
    Browse the repository at this point in the history
  4. Implement choice element decoding

    Create interface for branching off XMLChoiceKeys
    
    Add XMLSingleElementDecodingContainer copy pasta
    
    Add XMLDecoderImplementation.singleElementContainer(keyedBy:) copy pasta
    
    Push XMLChoiceKeys through singleElementContainer
    
    Add XMLUnkeyedDecodingContainer.nestedSingleElementContainer copy pasta
    
    Add XMLKeyedDecodingContainer.nestedSingleElementContainer copy pasta
    
    Add XMLSingleElementDecodingContainer.nestedSingleElementContainer copy pasta
    
    Remove print statement from test
    
    Make IntOrStringWrapper.CodingKeys: XMLChoiceKey
    
    Make Entry.CodingKeys: XMLChoiceKey
    
    Only allow KeyedBoxes pass through to SingleElementDecodingContainer
    
    Actually use XMLSingleElementDecodingContainer
    
    Make tests pass
    
    Rename XMLSingleElementDecodingContainer -> XMLChoiceDecodingContainer
    
    Use ChoiceBox
    
    Get rid of some prints
    
    Unimplement singleElementContainer
    
    Unimplement singleElementContainer
    
    Tidy xcscheme
    
    Unimplement nestedSingleElementContainer
    
    Remove dump
    
    Replace fatalError with thrown error
    
    Omit type label
    
    Omit type label
    
    Fix formatting
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    c128f28 View commit details
    Browse the repository at this point in the history
  5. Refactor clean up choice coding implementation

    Rename singleElementBox -> choiceBox
    
    Create privileged path for Choices
    
    Sweep away commented-out code
    
    Add comment
    
    Don't treat top-level choice
    
    Tighten up impl
    
    Rename singleElementContainer method -> choiceContainer
    
    Whoops that was the Encoder
    
    Add unkeyed single element container et al.
    
    Add messages to fatal errors
    
    Omit type label
    
    Switch to ChoiceBox based implementation
    
    Revert pretty printing special casing
    
    Add passing encode tests for choice elements with attributes
    
    Add xcodeproj debris
    
    Remove use of XMLUnkeyedSingleElementDecodingContainer
    
    Remove unreached code in XMLChoiceDecodingContainer
    
    Remove superDecoder methods because enums ain't classes
    
    Put all the decode impl in one place
    
    Whitespace
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    312c4f5 View commit details
    Browse the repository at this point in the history
  6. Rename XMLChoiceKey -> XMLChoiceCodingKey

    Add doc comment for XMLChoiceCodingKey
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    91693e9 View commit details
    Browse the repository at this point in the history
  7. Rename SingleElementBox to SingleKeyedBox

    Remove unused SingleKeyedBox.init?(_: KeyedBox)
    
    Change internal property name from singleElementBox to singleKeyedBox
    
    Remove internal property names singleElement -> singleKeyed
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    b5684f3 View commit details
    Browse the repository at this point in the history
  8. Rename nestedSingleElementContainer -> nestedChoiceContainer

    Rename header XMLSingleElementEncodingContainer -> XMLChoiceEncodingContainer
    
    Fix formatting
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    5fd8d8f View commit details
    Browse the repository at this point in the history
  9. Cull redundancies

    Slim down SingleKeyedBox
    
    Remove Foundation imports where not necessary
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    5bda791 View commit details
    Browse the repository at this point in the history
  10. Add enum with associated value encoding tests

    Add nested array encoding test
    
    Add array within dictionary test
    
    Formatting
    
    Add keyed within unkeyed test
    
    Add roundtrip test for keyed within keyed case
    
    Update test to roundtrip for robustness
    
    Add wrapped tests for encoding
    
    Fix formatting
    bwetherfield authored and jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    045e07c View commit details
    Browse the repository at this point in the history
  11. Fix usage to one key in the XMLChoiceDecodingContainer

    Resolve merge conflict
    
    Replace xcodeproj
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    a7fb985 View commit details
    Browse the repository at this point in the history
  12. Factor out mapKeys to XMLDecoderImplementation.transformKeyedContainer

    Reorder key decoding strategy cases
    
    Touch less
    
    Mutate directly
    jsbean committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    b1b6c27 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    048d0c3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5748eee View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c6ee065 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2019

  1. Configuration menu
    Copy the full SHA
    e6467d5 View commit details
    Browse the repository at this point in the history
  2. Share scheme

    jsbean committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    ce09102 View commit details
    Browse the repository at this point in the history
  3. Use Swift 4.2

    jsbean committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    f09c79d View commit details
    Browse the repository at this point in the history
  4. Use Swift 4.2 everywhere

    jsbean committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    0414fd8 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2019

  1. Configuration menu
    Copy the full SHA
    e1f0c45 View commit details
    Browse the repository at this point in the history
  2. Whitespace

    jsbean committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    0b9c5cc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a8125e2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf52ca8 View commit details
    Browse the repository at this point in the history
  5. Whitespace

    jsbean committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    fd594fd View commit details
    Browse the repository at this point in the history
  6. Remove print statement

    jsbean committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    a930d00 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2019

  1. Configuration menu
    Copy the full SHA
    5a7a64a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c000573 View commit details
    Browse the repository at this point in the history
  3. Rename _converted -> converted

    jsbean committed Jul 30, 2019
    Configuration menu
    Copy the full SHA
    d4bd9f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a99e95 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7920b72 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    683cb34 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7db9627 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c213808 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    32195c5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8149ead View commit details
    Browse the repository at this point in the history