update Finagle and Scalafix rule to rewrite Scrooge-generated code to work with this project #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unfortunately, several months ago Twitter's Scrooge project modified the way it generates code from Thrift IDL files, in a way that is no longer compatible with this project.
It used to generate code like this (with quite a lot more boilerplate—this is the distilled version):
Scrooge removed the generation of the higher-kinded
FooService[+MM[_]]
, and now generates code like this:async-utils relied on the higher-kinded trait to do its magic, so we need to reintroduce it. The rewrite rule will modify the generated code to look like this:
I couldn't find a straightforward way to do those rewrites and also move the
trait FooService[F[_]]…
up to the same level asobject FooService
. As a consequence, code that used to refer to the higher-kinded trait needs to refer to the new trait inside the object. I plan to follow this PR with another that will add another rewrite rule to automate those changes as well.