Is it possible to execute multiple goals while usi...
# general
g
Is it possible to execute multiple goals while using
--loop
. Such as
./pants fmt lint typecheck test --loop
To add context, I plan on using this to help teach a course on TDD and how to write perfect python code from the start. Getting continuous and automatic feedback drastically speeds up and improves this feedback loop.
👌 1
h
there's nothing about the
loop
code that should have a problem with multiple goals, as far as I can tell. I'm not sure if the
--loop
option will get parsed correctly if placed there, rahter than immediately after
pants
(as in
./pants --loop fmt lint typecheck test
)
are you running into any issues trying it?
w
yea, it’s a global option, so it applies to all of the goals: the position @hundreds-breakfast-49010 put it in on the CLI makes that more obvious, but doesn’t actually affect how it is used
@gorgeous-eve-12553: that course sounds really neat! let us know if we can help, or if there are any improvements you need for the
--loop
option!
g
It is more geared towards my junior developers, and will help them map out user requirements to TDD tests, that they can then complete one by one. I'll post back here with the github link when it is complete.
Also, it was the location of the
--loop
that was breaking my setup. I think I've asked that question in here before back when v2 was in beta.
h
what was the error you were getting?
if I run e..g
./pants lint fmt typecheck --loop src/python/pants/engine::
in the pants repo, I get a flag parsing error
g
I actually wasn't getting an error, it was just only running the first 2 stages and looping.
w
Are any of the files tests?
test
will no-op otherwise...
g
There aren't any tests yet, it was just hello world. But it was the
typecheck
that was skipping execution, and I had mis-matched types in my code to verify it was working.
w
Hm... interesting. I don't repro here. Would love to help get that working for you though...
what version are you using?
g
2.0.0 . And to be clear, it works perfectly for me once I put the
--loop
in the right spot.