Is there a tutorial for implementing `./pants tail...
# plugins
g
Is there a tutorial for implementing
./pants tailor
to your plugin? specifically because my target also takes in python files I'd like to overwrite the default
python_sources
and create my own target based on whether the file creates a specific object in the global space
h
There's no tutorial yet, alas
But there are tons of examples in the repo
Look for uses of PutativeTarget - this is what plugins can return to tailor to suggest a target
👍 1
And also note that you can use an alias mapping to get tailor to generate custom target types: https://www.pantsbuild.org/docs/reference-tailor#section-alias-mapping
🙌 1
👍 2
In case that is helpful
h
Warning that it is not currently possible to turn off tailor for
python_sources
, but that would be a good and easy contribution to make if you're interested. We already have
[python].tailor_requirement_targets
for example. It'd makee sense to have
[python].tailor_source_targets
👍 1