Hi Team, Trying to understand `Pants 2.21.0` beha...
# general
b
Hi Team, Trying to understand
Pants 2.21.0
behavior in following scenario: 1. Create a
virtualenv
thru
pants export
to be used in IDE. 2. Do usual development work. 3. Run
pants test ::
4. Update
requirements.txt
for the development of a new feature. 5. Develop the feature. 6. Run
pants test ::
—> I assume tests will be run after resolving the latest
requirements.txt
. Please confirm. At this point, do I explicitly need to run
pants export
again? Or would the
virtualenv
from step #1 would automatically be updated based on the new resolve from step #5? I expect it should automatically update the
virtualenv
but please confirm.
👀 1
c
Hi, There's currently no invalidation on exported virtualenvs (nor the lockfiles!), so you need to re-run
pants export
and
pants generate-lockfiles
(if you use lockfiles, which is recommended to do) after changing
requirements.txt
s
Technically, there is a situation where you don't need to run generate-lockfiles the second time - if you've added a requirement that was already in the lockfile because of transitive dependency. But even then it's better to generate it :)