AndrewRademacher / aeson-casing

Tools to change the formatting of field names in Aeson instances.
MIT License
16 stars 3 forks source link

Fix backward compatibility issue introduced in #4 #5

Closed amir closed 5 years ago

amir commented 5 years ago

Last release has introduced a change of behaviour. Not entirely sure whether the new behaviour is correct or not but this PR tries to bring the old one back.

AndrewRademacher commented 5 years ago

Thanks for pushing this fix in, before I merge it though I'm curious to know what the case is in which this behavior would be useful. I agree with generally not breaking backward compatibility, but it seems to me like configECRLogin should translate to ecr_login or ECR_login. As opposed to the example that you have given where it translates into e_cr_login.

Also apologies for the late response.

amir commented 5 years ago

Thanks for your attention. I agree with you and as I mentioned I'm not even sure whether the old behaviour was truly desired, perhaps I just wanted to bring the backward incompatibility issue to your attention and provide a fix should you decide to bring the old behaviour back.

I'm happy to close this without merging as the new behaviour seems more intuitive.

AndrewRademacher commented 5 years ago

Let's go that route then, I appreciate you bringing the inconsistency to my attention. I'm going to bump the package major version so if anyone hasn't updated yet they will at least have some way of knowing the behavior has changed. I'm not quite sure what other actions I'm allowed to take, as far as I'm aware Hackage wont let me go back and change an old package version.