Skip to content

Use sentinel timestamp for relative exclude-newer-package spans#19101

Merged
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/fix-uv-issue-19089-0wpgG
Apr 21, 2026
Merged

Use sentinel timestamp for relative exclude-newer-package spans#19101
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/fix-uv-issue-19089-0wpgG

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Apr 21, 2026

Closes #19089

Applies the same change as #19022 to per-package exclude-newer spans.

When a relative span (e.g. `3 weeks`) is configured for either the global
`exclude-newer` or a package-specific `exclude-newer-package` entry, write
the sentinel `0001-01-01T00:00:00Z` to the lockfile instead of the
computed cutoff. The span is what actually drives resolution, so storing
a fixed placeholder keeps the lockfile stable across `uv lock` runs even
as wall-clock time advances.

Also fix the `ExcludeNewer::compare` logic so a relative-timestamp-only
change at the global level doesn't mask a genuine per-package change
(and vice versa across packages).

Fixes astral-sh#19089.

https://claude.ai/code/session_01P4E1CZTWs99ozYvtNSUUaM
Comment thread crates/uv-resolver/src/lock/mod.rs Outdated
Comment thread crates/uv/tests/it/lock_exclude_newer_relative.rs Outdated
@zanieb zanieb force-pushed the claude/fix-uv-issue-19089-0wpgG branch from 445fe9e to 20e9ad1 Compare April 21, 2026 17:27
@zanieb zanieb marked this pull request as ready for review April 21, 2026 17:42
@zanieb zanieb requested review from zsol April 21, 2026 17:42
@zanieb zanieb merged commit c875b02 into astral-sh:main Apr 21, 2026
55 checks passed
@zsol zsol added the enhancement New feature or improvement to existing functionality label Apr 27, 2026
kdeldycke added a commit to kdeldycke/repomatic that referenced this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No-op timestamp for exclude-newer-package with spans

3 participants