{"action":"created","issue":{"url":"https://api.github.com/repos/finagle/finch/issues/246","labels_url":"https://api.github.com/repos/finagle/finch/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/finagle/finch/issues/246/comments","events_url":"https://api.github.com/repos/finagle/finch/issues/246/events","html_url":"https://github.com/finagle/finch/pull/246","id":71432141,"number":246,"title":"Use Shapeless's HList for request reader composition","user":{"login":"travisbrown","id":316049,"avatar_url":"https://avatars.githubusercontent.com/u/316049?v=3","gravatar_id":"","url":"https://api.github.com/users/travisbrown","html_url":"https://github.com/travisbrown","followers_url":"https://api.github.com/users/travisbrown/followers","following_url":"https://api.github.com/users/travisbrown/following{/other_user}","gists_url":"https://api.github.com/users/travisbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/travisbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisbrown/subscriptions","organizations_url":"https://api.github.com/users/travisbrown/orgs","repos_url":"https://api.github.com/users/travisbrown/repos","events_url":"https://api.github.com/users/travisbrown/events{/privacy}","received_events_url":"https://api.github.com/users/travisbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-27T23:45:10Z","updated_at":"2015-04-28T02:36:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/finagle/finch/pulls/246","html_url":"https://github.com/finagle/finch/pull/246","diff_url":"https://github.com/finagle/finch/pull/246.diff","patch_url":"https://github.com/finagle/finch/pull/246.patch"},"body":"I'm still working on the heterogeneous router, but I wanted to go ahead and post the `RequestReader` changes since they're more straightforward, and since #242 is now broken out into its own issue.\r\n\r\nA few points for discussion:\r\n\r\n* I'm using Shapeless 2.2.0 even though it's still a release candidate, since the release is likely to happen before 0.7.0 is ready otherwise. The only change that would be necessary (I believe) to go with 2.1 is in the `build.sbt`—before 2.2 plain old `%%` didn't work because `_2.10.4` had to be specified for 2.10.\r\n* I don't see any way to get rid of the boilerplate for `~>` and `~~>` without requiring the types of their arguments to be fully specified, which is annoying. I've provided commented-out generic implementations, but I've left the (modified) boilerplate-y versions for now.\r\n* I'm tempted to put the implicit classes that can't be made value classes in 2.10 because of [SI-8011](https://issues.scala-lang.org/browse/SI-8011) in version specific source trees, now that this is super easy in SBT 0.13.8. I haven't yet, though.\r\n* One small annoyance: `a ~ b ~> f` now needs parentheses: `(a :: b) ~> f`.\r\n* Otherwise I've only changed one test, to use a new `.tupled` method instead of explicitly mapping a tuple out of the `~`.\r\n* I went ahead and made it so that a \"bigger\" request for `a` is fine in e.g. `a :: param(\"foo\")` since this seems to fit common usage.\r\n\r\nThe syntax in #242 is supported verbatim:\r\n\r\n``` scala\r\ncase class User(id: Int, name: String)\r\nval user: RequestReader[User] = (param(\"id\").as[Int] :: param(\"name\")).as[User]\r\n```\r\n\r\nThanks to Shapeless's `Generic`."},"comment":{"url":"https://api.github.com/repos/finagle/finch/issues/comments/96889280","html_url":"https://github.com/finagle/finch/pull/246#issuecomment-96889280","issue_url":"https://api.github.com/repos/finagle/finch/issues/246","id":96889280,"user":{"login":"vkostyukov","id":1098539,"avatar_url":"https://avatars.githubusercontent.com/u/1098539?v=3","gravatar_id":"","url":"https://api.github.com/users/vkostyukov","html_url":"https://github.com/vkostyukov","followers_url":"https://api.github.com/users/vkostyukov/followers","following_url":"https://api.github.com/users/vkostyukov/following{/other_user}","gists_url":"https://api.github.com/users/vkostyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkostyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkostyukov/subscriptions","organizations_url":"https://api.github.com/users/vkostyukov/orgs","repos_url":"https://api.github.com/users/vkostyukov/repos","events_url":"https://api.github.com/users/vkostyukov/events{/privacy}","received_events_url":"https://api.github.com/users/vkostyukov/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T02:36:23Z","updated_at":"2015-04-28T02:36:23Z","body":"Btw, feel free to deprecate the `~` syntax in this PR so we could remove it in 0.7.0-SNAPSHOT."}}