Skip to content

Allow Bazel to build gRPC as a third-party dependency without git submodules#13060

Merged
nicolasnoble merged 5 commits intomasterfrom
unknown repository
Nov 21, 2017
Merged

Allow Bazel to build gRPC as a third-party dependency without git submodules#13060
nicolasnoble merged 5 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 19, 2017

Update Bazel WORKSPACE file and third_party/cares BUILD files so that Bazel can build gRPC as a dependency.

The WORKSPACE file now pulls third_party dependencies directly instead of requiring a git submodule init and update. The git hashes pulled by Bazel are exactly the same as the git submodules checked into third_party.

A tiny bit of complexity comes from the c-ares project's use of ares_config.h.cmake and ares_build.h.cmake. The current solution to this problem is to check in a valid ares_config.h and a few valid ares_config.h files. This is the same general approach used still, but ares_config.h and ares_build.h are supplied to cares.BUILD from the only remaining local_repository, which serves only to export these two header files.

@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

… Bazel can build gRPC as a dependency.

The WORKSPACE file now pulls third_party dependencies directly instead of requiring a git submodule init and update.
The git hashes pulled by Bazel are exactly the same as the git submodules checked into third_party.

A tiny bit of complexity comes from the c-ares project's use of ares_config.h.cmake and ares_build.c.cmake.
The current solution to this problem is to check in a valid ares_config.h and a few valid ares_config.h files.
This is the same general approach used still, but ares_config.h and ares_build.h are supplied to cares.BUILD
from the only remaining local_repository, which serves only to export these two header files.
@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@nicolasnoble
Copy link
Copy Markdown
Contributor

So, reading more closely this PR, what I don't necessarily like about it, is the loose coupling between the actual submodules and the WORKSPACE links. I'd rather have something that makes sure that if the submodule gets updated, some sort of test indicates that the WORKSPACE file has to be updated as well.

@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@ctiller
Copy link
Copy Markdown
Member

ctiller commented Oct 23, 2017 via email

@thelinuxfoundation
Copy link
Copy Markdown

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
The Linux Foundation CLA GitHub bot

@ctiller
Copy link
Copy Markdown
Member

ctiller commented Nov 1, 2017 via email

…ternal repo dependencies expressed via git submodules and those expressed as Bazel WORKSPACE rules agree exactly.
@ghost
Copy link
Copy Markdown
Author

ghost commented Nov 3, 2017

I've added a Python script that does impose some checks. It may require some updates if you'd like the sanity check to be performed in a slightly different way but it's a start to iterate on. Is there a formatter that was used on the other Python scripts in this directory? It's apparently not YAPF.

Also, the Linux Foundation CLA requirement must've been added some I opened this PR. Is that right?

@ghost
Copy link
Copy Markdown
Author

ghost commented Nov 7, 2017

ping (to prompt a reassessment of the Linux Foundation CLA)

I will look at the conflict with the c-ares BUILD file tonight.

@ghost
Copy link
Copy Markdown
Author

ghost commented Nov 14, 2017

I have resolved the conflict with third_party/cares/cares.BUILD.

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@nicolasnoble
Copy link
Copy Markdown
Contributor

Your new file, grpc/tools/run_tests/sanity/check_bazel_workspace.py needs the exec bit on, I think.

@ghost
Copy link
Copy Markdown
Author

ghost commented Nov 18, 2017

Thanks for the suggestion. Done.

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@nicolasnoble nicolasnoble merged commit 240762d into grpc:master Nov 21, 2017
lidizheng pushed a commit to lidizheng/grpc that referenced this pull request Feb 12, 2021
This patch adds a new tracer to support the SkyWalking tracing mechanism and format.

Risk Level: Low, a new extension.
Testing: Unit
Docs Changes: Added
Release Notes: Added

Signed-off-by: wbpcode <[email protected]>

Mirrored from https://github.com/envoyproxy/envoy @ 7d0f89b1011503ecd22f28e347cf7f76cba73057
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants