Open ncoghlan opened 1 month ago
The current workaround for the lack of this feature is setting UV_EXCLUDE_NEWER
in the calling environment. The downside of that approach is it means the locked_at
metadata for each environment isn't correct (as the real locked_at
time will be earlier than the nominal locked_at
time, and the real locked_at
time isn't recorded anywhere in the metadata for built archives or exported environments).
Lock timestamps are recorded via a dedicated metadata file stored alongside each requirements file generated with
uv pip compile
. This timestamp is then used in the generated artifact metadata (and to set the upper limit on file timestamps in the generated archives).In combination with the
--exclude-newer
feature inuv pip compile
, this approach to recording the lock timestamps means it is possible to specify a lock time that is earlier than the current time when that particular environment is locked.API and CLI options to select between the following two modes should be provided:
The existing "record the actual locking time" behaviour does NOT need to be retained (since it's a strictly worse alternative to the behaviour where every lock timestamp is set to the current time immediately before the locking process starts).