-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error when the last field is a nested class #15
Comments
Probably a bug. I would recommend you to use ficus for now. Since there is an ongoing attempt to fix SI2712 which affects henkan greatly, I am going to hold on making any change to it. |
I noticed as well that henkan might got confused when the last field is a nested field. A work around could be having an implicit Extractor of the nested class first. |
I use the work around as below and it works
I want to use henkan to handle not only typesafe configs but also serialization and unserialization to json and byte array, so Ficus cannot solve my problem. Since shapeless is still confusing to me and you consider not change henkan recently, could you give me some hints so I can fix this in my fork? |
@zhenghub I don't have a clue how to fix this bug yet. but this scala fix scala/scala#5102 will greatly simplify Henkan code, which will probably make it a lot easier to fix this problem. |
@kailuowang I've tried https://github.com/netvl/picopickle . It fixed the bug. But it is quite complicated to adapt picopickle to typesafe config, since many classes of typesafe config are not public which conflicts with picopickle's type transformation implementation. Meaning I need to write another series of classes as intermediate conversion. I would try pickling next. |
closing this because the experimental extract module has been removed. |
I meet an error when transform a typesafe config to a case class below.
Class Weapon has two fields: attack and defense. Both are Int. It may cause some problems:
scala 2.11, java 7, henken 0.1.0
The text was updated successfully, but these errors were encountered: