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

feat(generator): link each method input and output types #7665

Merged
merged 4 commits into from
Nov 24, 2021

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Nov 24, 2021

The protobuf documentation seems to use reference-style markdown links
for protos in the comments, i.e., each reference to Foo is formatted
as [Foo][google.blah.blah.v1.Foo]. This formatting is very
distracting if left verbatim, but it can be turned into a link if we
define google.blah.blah.v1.Foo as a link reference in Doxygen's
markdown.

With this change the input and output types of each method get such
reference link definitions. The definitions themselves are not visible,
but they make the generated Doxygen output easier to read.

This does not solve the problem when the referenced entity is not an
input or output type of the method, or when it references another
method. But it works in enough cases to make the change worthwhile.

Part of the work for #7664


This change is Reviewable

The protobuf documentation seems to use reference-style markdown links
for protos in the comments, i.e., each reference to `Foo` is formatted
as `[Foo][google.blah.blah.v1.Foo]`.  This formatting is very
distracting if left verbatim, but it can be turned into a link if we
define `google.blah.blah.v1.Foo` as a link reference in Doxygen's
markdown.

With this change the input and output types of each method get such
reference link definitions. The definitions themselves are not visible,
but they make the generated Doxygen output easier to read.

This does not solve the problem when the referenced entity is not an
input or output type of the method, or when it references another
method. But it works in enough cases to make the change worthwhile.
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 24, 2021
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: ff710696e77aeddb71836d4624b296d79c90b850

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #7665 (968c1f3) into main (f68316b) will decrease coverage by 0.00%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7665      +/-   ##
==========================================
- Coverage   95.28%   95.28%   -0.01%     
==========================================
  Files        1254     1254              
  Lines      113284   113313      +29     
==========================================
+ Hits       107946   107969      +23     
- Misses       5338     5344       +6     
Impacted Files Coverage Δ
...egration_tests/golden/golden_kitchen_sink_client.h 100.00% <ø> (ø)
...tegration_tests/golden/golden_thing_admin_client.h 100.00% <ø> (ø)
generator/internal/descriptor_utils.cc 95.68% <93.33%> (-0.18%) ⬇️
generator/internal/descriptor_utils_test.cc 97.24% <100.00%> (ø)
google/cloud/bigtable/internal/common_client.h 94.02% <0.00%> (-5.98%) ⬇️
google/cloud/bigtable/internal/common_client.cc 95.71% <0.00%> (-1.43%) ⬇️
google/cloud/pubsub/subscriber_connection_test.cc 97.18% <0.00%> (-0.71%) ⬇️
.../cloud/storage/benchmarks/throughput_experiment.cc 74.37% <0.00%> (-0.51%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.75% <0.00%> (-0.25%) ⬇️
google/cloud/pubsub/samples/samples.cc 92.10% <0.00%> (+0.07%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f68316b...968c1f3. Read the comment docs.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 8fef676a35d57d80c1b16543ca0547467f490129

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review November 24, 2021 19:54
@coryan coryan requested a review from a team as a code owner November 24, 2021 19:54
@coryan coryan marked this pull request as draft November 24, 2021 20:18
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 968c1f350fafe1d6e86abb21abf91ca484050e4a

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review November 24, 2021 21:14
@coryan
Copy link
Contributor Author

coryan commented Nov 24, 2021

Sorry about the churn, should be in a good place to review now.

@dbolduc
Copy link
Member

dbolduc commented Nov 24, 2021

You are adding reference links for many methods that don't need them, but I think it's harmless.

@coryan coryan merged commit 0921d57 into googleapis:main Nov 24, 2021
@coryan coryan deleted the feat-generator-better-links branch November 24, 2021 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants