Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-650

Support case classes and tuples without reflection or codegen using shapeless

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Scrunch
    • None

    Description

      Scrunch support for case classes is pretty buggy, only supports a subset of scala versions, and fails at runtime instead of compile time if something goes wrong. Additionally, the support of tuple types via code generation is awkward and unnecessary.

      This patch should hopefully solve both of these with a shapeless (https://github.com/milessabin/shapeless) based solution which should be much simpler and more reliable, by defining a mechanism for deriving PTypeH instances for HLists where PTypeH instances for each type in the list is known.

      We have used it in a few production cases at SC for a while, and the unit and integration test suite passes, but I didn't write any new tests specifically for this purpose. Hopefully they should be covered by the existing tests using case classes and tuples.

      Attachments

        Activity

          People

            davw David Whiting
            davw David Whiting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: