I’m migrating a significant codebase to Scala 3. Unfortunately, I bumped into an issue … the project makes heavy use of PureConfig and HOCON-based configuration.
Unfortunately, PureConfig’s derivation doesn’t work for Scala 3. It has some derivation support for ConfigReader, but it’s incomplete and I need ConfigWriter as well.
The other difficulty is that rewriting the configuration files is not an option, due to opportunity for breakage. And PureConfig uses “kebab-case” in HOCON, rather than camelCase. Which is why other solutions may prove challenging.
The solutions I’m seeing:
- Switch tech, circe-config perhaps;
- Define readers and writers manually (daunting task, as there are a lot of classes, so that means a lot of boilerplate and potential for errors);
- Define my auto-derivation logic, I’m almost inclined to do it, but seeing that Pureconfig itself couldn’t do it for so long, there must be difficulties I’m not seeing.
Any experiences anyone can share in migrating a Pureconfig-driven project to Scala 3?