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

[RFC] Do not print the table row if the docstring is empty. #46

Closed
wants to merge 3 commits into from

Conversation

fenghaolw
Copy link

There are often cases that we want to hide some of the attributes from user-facing docs. For example some attributes that are only used for migration or internal debugging purposes, it is confusing to show them in the stardoc.

Ideally there should be some other attributes to indicate this, but for now it seems like it is okay to use empty docstring for this? It is unlikely if anyone want to show a table row with attribute name, type, ... but without any descriptions.

@brandjon brandjon requested review from brandjon and removed request for jin, laurentlb and c-parsons January 7, 2021 23:34
@brandjon
Copy link
Member

brandjon commented Jan 7, 2021

Hi Hao, thanks for the PR and sorry for the lack of activity. Let me give an update on the state of this repo:

We intend to develop a replacement for stardoc that's built into the Bazel binary. This will avoid skew between a bzl file's true semantics and what the doc tooling thinks the semantics should be. When it's ready, we'll deprecate this repo.

In the meantime, we commit to keeping the essential functionality working, but will not necessarily have the bandwidth to accept enhancements. We'll be making a triage pass over this repo soon and will let you know whether we can merge this PR.

@googlebot scan for cla

@google-cla google-cla bot added the cla: yes label Jan 7, 2021
Copy link
Collaborator

@tetromino tetromino left a comment

Choose a reason for hiding this comment

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

IMHO, parameters without a docstring should be documented: the name and type of parameter may well be self-explanatory.

If we want to hide things from documentation, I would suggest hiding names that start with a non-alphabetic symbol (e.g. underscore).

@tetromino
Copy link
Collaborator

Closed per #46 (review)

@tetromino tetromino closed this May 20, 2024
@fenghaolw
Copy link
Author

Can we still use this attribute normally if it starts with underscores? My understanding is that means the attribute is "private". In our cases (inside of Google) it is quite a common to have "public" attribute for migration but really do not want anyone to use. We use scary names like "xxx_for_migration_only_please_do_not_use_without_talking_with_us". Printing this in stardoc is annoying.

@tetromino
Copy link
Collaborator

Can we still use this attribute normally if it starts with underscores? My understanding is that means the attribute is "private". In our cases (inside of Google) it is quite a common to have "public" attribute for migration but really do not want anyone to use. We use scary names like "xxx_for_migration_only_please_do_not_use_without_talking_with_us". Printing this in stardoc is annoying.

You're right: attributes that start with _ are private (https://bazel.build/extending/rules#private_attributes_and_implicit_dependencies).

I've written up a feature request in #223 - take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants