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

Show pants.toml snippet for global/goal/subsystem options, like current site #9

Closed
huonw opened this issue Dec 30, 2023 · 3 comments · Fixed by #68
Closed

Show pants.toml snippet for global/goal/subsystem options, like current site #9

huonw opened this issue Dec 30, 2023 · 3 comments · Fixed by #68
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@huonw
Copy link
Contributor

huonw commented Dec 30, 2023

From #4:

The current 2.19.x reference docs show a TOML snippet, e.g. https://www.pantsbuild.org/v2.19/docs/reference-add-trailing-comma, but the new ones don't show this https://docs.pantsbuild.org/2.19.x/reference/subsystems/add-trailing-comma . Is that expected?

image
@thejcannon
Copy link
Member

I mustve started this venture before that change was introduced. We have the ability to update all reference docs with certain changes (which I'd argue is a great thing).

I suspect if we update the Option React component we can roll this out easily.

@huonw huonw added this to the Switch-over milestone Dec 31, 2023
@huonw huonw added the enhancement New feature or request label Dec 31, 2023
@huonw huonw self-assigned this Dec 31, 2023
@huonw
Copy link
Contributor Author

huonw commented Dec 31, 2023

Nice.

I started investigating this and I think we'll need to port pantsbuild/pants#19718 (and pantsbuild/pants#20345) either to the component or, better, to generate.js.

@huonw
Copy link
Contributor Author

huonw commented Dec 31, 2023

Ah, AIUI, it may be somewhat awkward to do broad-sweeping regeneration like this: #29 for discussion.

@huonw huonw removed their assignment Dec 31, 2023
@huonw huonw self-assigned this Jan 6, 2024
@huonw huonw closed this as completed in #68 Jan 9, 2024
huonw added a commit that referenced this issue Jan 9, 2024
This has each option for a goal and subsystem show how to set that
option in `pants.toml`, by also generating the relevant TOML code block
and rendering it.

This is essentially a straight port of the Python code that does this
for the readme docs
(https://github.com/pantsbuild/pants/blob/842c566b31b3f9ee3a06640a339d3d7f93508c09/build-support/bin/generate_docs.py#L324-L379)
to JavaScript.

Fixes #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants