Hi, Is there a command I can run that tells me whe...
# general
h
Hi, Is there a command I can run that tells me whether or not the lock file is synced with the reqs and constraints? To clarify, I'm not asking if packages could be pinned to a newer version in the lockfile. Instead, I'd like to know if that lockfile is still valid. For example, if I have a constraint for
pytest<=1.0.0
and the lockfile has
pytest==1.0.0
, than I consider the lockfile valid. However, if I then change the constraint to
pytest>1.0.0
, then the lockfile is no longer valid and needs to be re-generated. Also, please feel free to LMK if I'm wrong about the terminology.
d
Won’t you just run into an
InvalidLockfileError
when you attempt to run a target that depends on the dep in question? I’m not sure there’s a specific check that can be ran independently
☝️ 1
h
I'm still in the process of integrating Pants into our flow and, unfortunately, the process will take a few more months. In the meantime, people push new commits that might make this lockfile invalid without it being flagged in CI.
h
Interesting, I think it would be straightforward to add a
--check
option to
generate-lockfiles
that just validates but does not regenerate.
Can you open a ticket?
h
I will
h
Thanks!