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

Stardoc generates API docs for core rules #3000

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

alexeagle
Copy link
Contributor

Replaces hand-maintained core.rst file.

  • some prose documentation sections from the core.rst are moved into their own markdown documents
  • docs/ folder generated by running stardoc on APIs like go_binary
  • docstrings for attributes ported back into the starlark code
  • verification method is the same side-by-side diff as for Stardoc generates extras.md #2992

@google-cla google-cla bot added the cla: yes label Nov 9, 2021
@steeve
Copy link
Contributor

steeve commented Nov 9, 2021

This is amazing, thank you!

@google-cla
Copy link

google-cla bot commented Nov 9, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. 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 then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Nov 9, 2021
@cvarier
Copy link
Contributor

cvarier commented Nov 10, 2021

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Nov 10, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. 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 then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@alexeagle
Copy link
Contributor Author

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Nov 10, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Nov 10, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@cvarier
Copy link
Contributor

cvarier commented Nov 10, 2021

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 10, 2021
@achew22 achew22 requested a review from steeve November 10, 2021 23:41
@alexeagle
Copy link
Contributor Author

@steeve this is going stale and will be hard for me to keep it going for long. Can I help get it reviewed?

@achew22
Copy link
Member

achew22 commented Dec 28, 2021

If you sync this up I'm happy to merge without @steeve giving it another look

Avoids needing to manually keep rst content in sync with starlark
changes.
@alexeagle
Copy link
Contributor Author

#3004 landed while this was open, I moved the newly introduced env docstring into starlark.

load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")

def stardoc_with_diff_test(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

incidentally we have this function in aspect-build/bazel-lib now, and that repo is Apache 2, so we could possibly introduce a dependency on it from rules_go if you want to avoid maintaining this

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to keep deps in rules_go to a bare minimum for end users so I think keeping it in repo is not a terrible situation. Have you considered getting it into the stardoc repo? Then using it would be straight forward and wouldn't add any more deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't tried, based on Googlers silent on my https://github.com/bazelbuild/bazel-skylib/pulls/alexeagle and especially bazelbuild/bazel-skylib#321 I don't want to spend the time if it's never going to merge.

Thanks for getting this in!

@achew22 achew22 merged commit ba7bdfd into bazel-contrib:master Dec 28, 2021
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.

4 participants