-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add reference docs for BUILD file symbols #216
Conversation
75f78bf
to
376053f
Compare
376053f
to
532d4fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
return ( | ||
<div className="margin-bottom--lg"> | ||
<CodeBlock language="python"> | ||
{/* if there's no signature, the BUILD file symbol is just a constant... but we don't currently have any info about what that constant is */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah that's a bummer. FWIW we delayed publishing these docs solely because we threw the baby out with the bathwater on documenting constants.
Thank you for doing this, and for not allowing constants to halt a great improvement 👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, do you have a reference to any of that? Just want to make sure I'm across any extra issues that were identified to avoid having to rediscover everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is what I'm thinking of: pantsbuild/pants#18117
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, thanks. That seems to have some good thinking, particularly relevant to pantsbuild/pants#20978, but none of it seems like major missing pieces that should block this... so I'll get it in.
This adds a new section to the reference docs:
/2.x/reference/build-file-symbols/
. This renders all the known non-target BUILD file symbols, as indicated by thename_to_build_file_info
key of thehelp-all
output JSON.This JSON looks like the following, and this generation basically just mashes it up into documentation form:
This is a new sidebar option:
Some of these have reasonable docs:
Others do not have good docs:
I think we should land this and then separately work to improve the documentation of each BUILD file symbol:
help-all
output pants#20976stevedore_namespace
documentation showsstr
's doc string pants#20977PANTS_VERSION
BUILD file symbol has no docs pants#20978help
/help-all
pants#20979per_platform
help text shows plugin-focused guide, not usage pants#20980To make this work, there's two other changes required, which are done as separate commits:
BUILD file symbols
is placed last, rather than beforeGlobal options
(thus becoming the default)This generates back to the first version that include that (2.16) and involves some other changes to the code-genned docs, hence this is targeted
automation:sync-docs
.Fixes #212