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

"Making subsystems exportable with their default lockfile" docs render funny #20891

Closed
huonw opened this issue May 9, 2024 · 0 comments · Fixed by #20902
Closed

"Making subsystems exportable with their default lockfile" docs render funny #20891

huonw opened this issue May 9, 2024 · 0 comments · Fixed by #20902

Comments

@huonw
Copy link
Contributor

huonw commented May 9, 2024

Describe the bug

The new docs for exporting tools https://www.pantsbuild.org/2.21/docs/writing-plugins/common-subsystem-tasks#making-subsystems-exportable-with-their-default-lockfile renders a bit funny. It looks like a list ends up nested within a :::note unintentionally?

image

## Making subsystems exportable with their default lockfile
:::note Support depends on language backend of the subsystem
Only some language backends support `pants export`. These include the Python and JVM backends. Only tools which are themselves written to use a backend with this feature can be exported. For example, a Python-based tool which operates on a different language is exportable.
1. Make the subsystem a subclass of `ExportableTool`
:::note Language backends may have done this in their Tool base class. For example, the Python backend with `PythonToolRequirementsBase` and JVM with `JvmToolBase` are already subclasses.
```python
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
from pants.core.goals.resolves import ExportableTool
class FortranLint(PythonToolBase, ExportableTool):
...
```
2. Register your class with a `UnionRule` with `ExportableTool`
```python
def rules():
return [
UnionRule(ExportableTool, FortranLint)
]
```

I think :::note admonitions require a ::: on its own line to close them: https://docusaurus.io/docs/markdown-features/admonitions

Pants version

2.21

OS
N/A

Additional info
Add any other information about the problem here, such as attachments or links to gists, if relevant.

@huonw huonw added this to the 2.21.x milestone May 9, 2024
@huonw huonw self-assigned this May 10, 2024
huonw added a commit that referenced this issue May 15, 2024
This makes two minor adjustments to the "Making subsystems exportable
..." docs from #20730:

- close the `:::note` admonitions with `:::`
- indent some items to be nested within the relevant list items

Fixes #20891
WorkerPants pushed a commit that referenced this issue May 15, 2024
This makes two minor adjustments to the "Making subsystems exportable
..." docs from #20730:

- close the `:::note` admonitions with `:::`
- indent some items to be nested within the relevant list items

Fixes #20891
huonw added a commit that referenced this issue May 15, 2024
…y-pick of #20902) (#20928)

This makes two minor adjustments to the "Making subsystems exportable
..." docs from #20730:

- close the `:::note` admonitions with `:::`
- indent some items to be nested within the relevant list items

Fixes #20891

Co-authored-by: Huon Wilson <huon@exoflare.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant