{"action":"created","issue":{"url":"https://api.github.com/repos/milessabin/shapeless/issues/460","labels_url":"https://api.github.com/repos/milessabin/shapeless/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/milessabin/shapeless/issues/460/comments","events_url":"https://api.github.com/repos/milessabin/shapeless/issues/460/events","html_url":"https://github.com/milessabin/shapeless/issues/460","id":107143310,"number":460,"title":"Support for very large (> 254 fields) scrooge-like classes","user":{"login":"stephanh","id":376868,"avatar_url":"https://avatars.githubusercontent.com/u/376868?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanh","html_url":"https://github.com/stephanh","followers_url":"https://api.github.com/users/stephanh/followers","following_url":"https://api.github.com/users/stephanh/following{/other_user}","gists_url":"https://api.github.com/users/stephanh/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanh/subscriptions","organizations_url":"https://api.github.com/users/stephanh/orgs","repos_url":"https://api.github.com/users/stephanh/repos","events_url":"https://api.github.com/users/stephanh/events{/privacy}","received_events_url":"https://api.github.com/users/stephanh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-18T06:43:10Z","updated_at":"2015-09-18T09:44:06Z","closed_at":null,"body":"Hey Miles,\r\n\r\nAs we talked about in Vancouver we have a similar use case to #371. However, we need to support thrift structs with more than 254 fields, which is the maximum number of fields a method on the JVM can have. We have, therefore, developed [Humbug](https://github.com/CommBank/humbug), which implements the same encode/decode methods and metadata as scrooge but uses mutation to set the individual fields.\r\n\r\nWe then have our own macros to [extract](https://github.com/CommBank/maestro/blob/master/maestro-macros/src/main/scala/au/com/cba/omnia/maestro/macros/Inspect.scala) all the field information from Scrooge/Humbug thrift classes and generate [encoders](https://github.com/CommBank/maestro/blob/master/maestro-macros/src/main/scala/au/com/cba/omnia/maestro/macros/EncodeMacro.scala), [decoders](https://github.com/CommBank/maestro/blob/master/maestro-macros/src/main/scala/au/com/cba/omnia/maestro/macros/DecodeMacro.scala) from text, [transformations](https://github.com/CommBank/maestro/blob/master/maestro-macros/src/main/scala/au/com/cba/omnia/maestro/macros/AutomapMacro.scala), etc.\r\n\r\nObviously it would be awesome if Shapeless could support such a use case (in a performant) manner. :smile:"},"comment":{"url":"https://api.github.com/repos/milessabin/shapeless/issues/comments/141405281","html_url":"https://github.com/milessabin/shapeless/issues/460#issuecomment-141405281","issue_url":"https://api.github.com/repos/milessabin/shapeless/issues/460","id":141405281,"user":{"login":"milessabin","id":131183,"avatar_url":"https://avatars.githubusercontent.com/u/131183?v=3","gravatar_id":"","url":"https://api.github.com/users/milessabin","html_url":"https://github.com/milessabin","followers_url":"https://api.github.com/users/milessabin/followers","following_url":"https://api.github.com/users/milessabin/following{/other_user}","gists_url":"https://api.github.com/users/milessabin/gists{/gist_id}","starred_url":"https://api.github.com/users/milessabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milessabin/subscriptions","organizations_url":"https://api.github.com/users/milessabin/orgs","repos_url":"https://api.github.com/users/milessabin/repos","events_url":"https://api.github.com/users/milessabin/events{/privacy}","received_events_url":"https://api.github.com/users/milessabin/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T09:44:06Z","updated_at":"2015-09-18T09:44:06Z","body":"Hi Stephan!\r\n\r\nWork on #371 is well under way ... that should be fixed for 2.3.0 (an RC1 should arrive shortly after Scala World next week) ... but it won't address your > 254 fields issue.\r\n\r\nRather than initializing via vars have you considered initializing via using a single `HList` argument? Ie. something along the lines of,\r\n\r\n```scala\r\nclass Foo[L <: HList](args: L) {\r\n  val arg1 = args.head\r\n  val arg2 = args.tail.head\r\n  ... etc. ...\r\n}\r\n```\r\nI appreciate that the above isn't very attractive as it stands, but if something along these lines is viable from a runtime point of view then it might be possible to come up with something acceptable which also gets along nicely with type class derivation."}}