You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 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
classFortranLint(PythonToolBase, ExportableTool):
...
```
2. Register your class with a `UnionRule` with `ExportableTool`
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
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
…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>
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?pants/docs/docs/writing-plugins/common-subsystem-tasks.mdx
Lines 53 to 78 in 2505e54
I think
:::note
admonitions require a:::
on its own line to close them: https://docusaurus.io/docs/markdown-features/admonitionsPants 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.
The text was updated successfully, but these errors were encountered: