I have developed several plugins for running `uv s...
# plugins
c
I have developed several plugins for running
uv sync
and
uv build
. I want to create a goal that wraps the other goals. Does anyone have a reference for how to do this? I'm finding this surprisingly difficult. Here's a ref to my current plugins: https://github.com/TechnologyBrewery/pants-uv-lifecycle-plugin/tree/dev/src/pants_uv_lifecycle_plugin
h
What does “a goal that wraps the other goals” do? Can you give an example?
c
The end state is to develop a
lifecycle
goal than when we call it via
pants lifecycle,
it runs through
pants lint
,
pants test
,
pants uv-sync
,
pants uv-build
, etc. This is loosely similar to Maven’s
mvn install
command.
h
Maybe you could achieve this with a simple CLI alias ?
Just create an alias named “lifecycle” that expands to
lint test uv-sync uv-build
?
c
Okay, I hadn’t thought about that option. I’m going to use the
lifecycle
goal in multiple projects, so would you say that the CLI alias is the best option?
h
Hey, checking in on this, I neglected to reply back then, sorry.
Aliases are in config, so they would need to be in the config of each project.
Which may not be ideal?
By “project” I mean “repos”
so one in each
pants.toml
, how many of those do you have?
(we should probably get rid of this channel and have such discussions in #C046T6T9U, the more channels we have, the more channels we neglect 😞 )
c
No worries on the delay. My team actually decided this week to shift gears and use maven daemon instead. To respond though, I guess we could have used an alias by setting it up via a velocity template or something. The end goal of our project is to have a reproducible build lifecycle tool similar to Apache maven.