brash-honey-7160
06/30/2025, 8:38 PMtailor
to be run such that it actually writes the dependencies (for things like python libraries of a python source) to the BUILD file...? I'm struggling to see why it's a good pattern to have everything inferred in the CLI without any static output that can be searched, verified, etc. without having to run peek
.
• I'm confused how Pants works with Venvs or lockfiles... how does Pants know what versions of python or packages to use? How does it know which python executable to use? Does it make a Venv under the hood? I'm not familar with Pex, so maybe I'm missing something here... but I'm having a bit of trouble understanding how to transition from a Venv+Poetry+Make approach, to Pants.
• What sort of development workflow would Pants ultimately allow me to have? For example, if I update a library version, would it have a command to say "run all the tests that transitively depend on [updated package]"? If I update a library used by multiple microservices, I can use the change detection to deploy those services?
Please forgive my utter dismay and confusion, as I'm still just scratching the surface of this tool and have little to no support from my team so I'm shooting in the dark on this. I've never used a monorepo tool in JS/TS or any other language/framework, so I'm still trying to wrap my head around this approach (versus libraries). Thanks in advance for any and all information anyone can provide here!microscopic-knife-5995
06/30/2025, 10:52 PMI'm curious if there's some CLI features that allowsI understand where you are coming from. You would like to understand how things are inferred in case of debugging etc. In my experience, Pants import inference is very reliable and I am glad I don't need to explicitly declare everything like Blaze asks me to.to be run such that it actually writes the dependencies (for things like python libraries of a python source) to the BUILD file...? I'm struggling to see why it's a good pattern to have everything inferred in the CLI without any static output that can be searched, verified, etc. without having to runtailor
.peek
I'm confused how Pants works with Venvs or lockfiles... how does Pants know what versions of python or packages to use? How does it know which python executable to use? Does it make a Venv under the hood? I'm not familar with Pex, so maybe I'm missing something here... but I'm having a bit of trouble understanding how to transition from a Venv+Poetry+Make approach, to Pants.From the dev point of view, Pants does create a venv (though implemented with pex). I lock my dependencies so I know exactly which dependencies Pants will use when it creates a venv for a target. Note Pants create venv per target not one large venv for everything. This makes things more portable.
What sort of development workflow would Pants ultimately allow me to have? For example, if I update a library version, would it have a command to say "run all the tests that transitively depend on [updated package]"? If I update a library used by multiple microservices, I can use the change detection to deploy those services?Yes, Pants understands the dependency DAG and it will only run targets that are affected. This is why it is a powerful monorepo build tool. It will cache results that don't need to be re-run, and only do the work that needs to be done!
happy-kitchen-89482
07/01/2025, 2:08 AMhigh-psychiatrist-4761
07/01/2025, 5:23 PMFrom the dev point of view, Pants does create a venv (though implemented with pex). I lock my dependencies so I know exactly which dependencies Pants will use when it creates a venv for a target. Note Pants create venv per target not one large venv for everything. This makes things more portable.Is it called sandbox? For example, when we do
pants test path/to/package:test
, does it create some sandbox and only install the necessary dependencies for the test? Not the whole universe of the dependencies of the whole monorepo, right?microscopic-knife-5995
07/01/2025, 8:54 PMpants --pex-verbosity=9 --print-stacktrace -ldebug --keep-sandboxes=always
happy-kitchen-89482
07/02/2025, 7:21 PMhappy-kitchen-89482
07/02/2025, 7:23 PMhappy-kitchen-89482
07/02/2025, 7:24 PMhappy-kitchen-89482
07/02/2025, 7:27 PMhappy-kitchen-89482
07/02/2025, 7:28 PMhappy-kitchen-89482
07/02/2025, 7:30 PMpants --changed-since=main (--changed-transitive) test
happy-kitchen-89482
07/02/2025, 7:30 PMhappy-kitchen-89482
07/02/2025, 7:31 PMhappy-kitchen-89482
07/02/2025, 7:32 PMxargs
and piping the output of pants list --filter...
to some other pants command