Skip to content
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

frdrpc: rename proto, use Docker for compilation, move to GitHub CI #110

Merged
merged 6 commits into from
Apr 21, 2021

Conversation

guggero
Copy link
Member

@guggero guggero commented Mar 29, 2021

The main purpose of the PR is to rename rpc.proto to faraday.proto in an attempt to get rid of the error WARNING: proto: file "rpc.proto" is already registered we see wherever we use both Faraday as well as lnd as libraries.

While we're at it, we also use Docker for compiling the RPC protos, update the golang version and move the CI pipeline to GitHub.

@guggero guggero requested a review from carlaKC March 29, 2021 12:57
Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement! Just some nits.

ARG PROTOC_GEN_VERSION
ARG GRPC_GATEWAY_VERSION

ENV FALAFEL_VERSION="v0.7.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FALAFEL_VERSION unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, obviously this isn't needed 😅

@@ -21,4 +21,4 @@ require (
gopkg.in/macaroon.v2 v2.1.0
)

go 1.13
go 1.15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: commit message doesn't quite fit, since we're bumping min version and docker versions to different values

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, fixed.

guggero added 6 commits April 21, 2021 15:35
Because the file name "rpc.proto" is already taken by lnd, we get a
weird warning everywhere we include both the lnd and faraday, as
libraries for example:
WARNING: proto: file "rpc.proto" is already registered

We fix this problem by renaming faraday's proto file.
To simplify the RPC generation and make it easier for people to compile
the faraday.proto file, we extract the REST definitions into their own
file.
To make the protobuf and grpc versions used in Faraday independent of
those in lnd, we compile the protos inside a container. Therefore the
local development environment doesn't have to match any other project
in terms of those versions for successful compilation.
@guggero guggero merged commit de548c0 into lightninglabs:master Apr 21, 2021
@guggero guggero deleted the rpc-rename branch April 21, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants