I am running to conversions of a few repos to Pant...
# general
i
I am running to conversions of a few repos to Pants and am wondering if there are techniques for performance improvements in how or what I am doing ...
Copy code
./pants test libs/somelib/tests/decorators/test_foobar.py
After this begins,
Pants
starts by building a
pex
from the requirements.txt .. (and tests_requirements.txt)
Copy code
10:06:26.17 [INFO] Canceled: Building requirements.pex with 31 requirements: ... etc ... (381 characters truncated)
10:06:32.25 [INFO] Completed: Building pytest.pex from pytest_default.lock
10:07:08.96 [INFO] Completed: Building requirements.pex with 31 requirements: ... etc ... (381 characters truncated)
the requirements are in the
BUILD
file as
Copy code
python_requirements(
    name="requirements"
)

python_requirements(
    name="test_requirements",
    source="test_requirements.txt",
)
two questions. 1. why does Pants "Cancel" the first build but then proceed immediately to build it. 2. how can I get Pants to cache this file, it hasn;t changed and everytime i run the test, it rebuilds the requirements.pex which is 60s.
w
the Canceled is because it is trying to “clean” the graph from a previous run and then failing. that should only happen if something has actually changed. so to check on that, you should look in
.pants.d/pants.log
, which will show which files pants thinks have changed
i
gotcha - ok
thanks
w
Did you find something?