-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move command & core proto defs to new subproject #4096
Conversation
Protobuf definition files were moved from common and core to a new protodefinition subproject. The two main reasons for doing this are to speed up builds by not having to regenerate common and core protobuf classes every time a change is made in those subprojects, and to remove the grpc cli's direct dependency on core, and the transitive dependency on common. In order to accomplish this, cli's BisqCliMain was stripped of its dependencies on common and core. Cli can only get the version and balance now. gRPC stub boilerplate was moved from BisqCliMain to a CliCommand class to avoid some of the bloat that is going to happen as the read-response loop supports more rpc commands.
This is looking good, @ghubstan. I'm going to push one or more commits to this branch as my review. |
This is done primarily for concision. This change also repackages bisq.grpc => bisq.proto.grpc in anticipation of repackaging the definitions in pb.proto from 'protobuf' to 'bisq.proto'. There should not be any compatibility issues with doing this, but it's out of scope here. When complete, the relationship between bisq.proto.grpc and bisq.proto will be more intuitively clear, i.e. that bisq.proto.grpc has certain dependencies on bisq.proto classes, but not the other way around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, please see my two review commits.
I didn't mention this in the commit comments, but I also removed the FIXMEs from grpc.proto about IDEA complaining about not having references to imported proto definitions from pb.proto. I'm not getting any errors any more, and I can navigate from grpc.proto to pb.proto by clicking, e.g. CMD-B
on the imported definition. Find Usages on, e.g. the TradeStatistics2
proto def shows its usage in grpc.proto, etc, so I think everything is working as expected. This is probably because of some bug fix in a recent version of the IDEA protobuf plugin.
I knew something was wrong with my codeStyleSettings, and there still is after setting editor code style scheme to "default", formatting imports with that, then resetting it back to "project". I let ^ALT-L organize imports, but doing it through the reformat dialog gives the same result. |
Thanks for reviewing this so quickly. |
You might want to |
|
Merging PR bisq-network#4096, which moved protobuf defs out of core and common, left :seednode without its required dependency on guava, causing NoSuchMethodErrors.
Protobuf definition files were moved from common and core to a new
protodefinition subproject.
The two main reasons for doing this are to speed up builds by not
having to regenerate common and core protobuf classes
every time a change is made in those subprojects, and to remove
the grpc cli's direct dependency on core and the transitive dependency
on common.
In order to accomplish this, cli's BisqCliMain was stripped of
its dependencies on common and core. Cli can only get the version
and balance now.
gRPC stub boilerplate was moved from BisqCliMain to a CliCommand
class to avoid some of the bloat that is going to happen as the
read-response loop supports more rpc commands.