crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Whiting (JIRA)" <>
Subject [jira] [Commented] (CRUNCH-650) Support case classes and tuples without reflection or codegen using shapeless
Date Wed, 12 Jul 2017 09:03:00 GMT


David Whiting commented on CRUNCH-650:

Are you worried about transient deps or shapeless itself? There's only one transient dependency
on macro-compat, but shapeless itself could be awkward wrt Scala version numbering, as we
don't build different versions of Scrunch for different versions of Scala. If we can somehow
fix that, and do _2.10, _2.11 and _2.12 builds of scrunch then I think this is a safe addition,
but without that perhaps not.

> Support case classes and tuples without reflection or codegen using shapeless
> -----------------------------------------------------------------------------
>                 Key: CRUNCH-650
>                 URL:
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Scrunch
>            Reporter: David Whiting
>            Assignee: David Whiting
>         Attachments: 0001-Replace-generated-tuple-code-and-reflective-case-cla.patch
> 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 (
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.

This message was sent by Atlassian JIRA

View raw message