Skip to content

feat: Relative exclude-newer configuration#5786

Merged
baszalmstra merged 61 commits intoprefix-dev:mainfrom
pavelzw:exclude-newer-duration
Apr 7, 2026
Merged

feat: Relative exclude-newer configuration#5786
baszalmstra merged 61 commits intoprefix-dev:mainfrom
pavelzw:exclude-newer-duration

Conversation

@pavelzw
Copy link
Copy Markdown
Collaborator

@pavelzw pavelzw commented Mar 27, 2026

Description

Fixes #4545

How Has This Been Tested?

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: codex

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

Comment thread Cargo.toml
@ruben-arts
Copy link
Copy Markdown
Contributor

Is this also supposed to add this to the pypi dependencies?

@pavelzw
Copy link
Copy Markdown
Collaborator Author

pavelzw commented Mar 30, 2026

i would move this to a follow-up pr, this one will already be quite big

Copy link
Copy Markdown
Contributor

@hunger hunger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't find any real issue:-) Good work.

Comment thread crates/pixi_spec/src/exclude_newer.rs Outdated
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment on lines +71 to +72
backend_name: &'static str,
backend_version: &'static str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make this backend_identifier: Option<(&'static str, &'static str)> Then on intermediate backend instantiator add a function to set these fields. Makes test code simpler.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +765 to +769
let (backend_name, backend_version) = self.backend_identifier.ok_or_else(|| {
miette::miette!(
"backend identifier must be set before running conda/build-v1 for the intermediate backend"
)
})?;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the tests no? Let just use Default for system tools if this is None too.

Copy link
Copy Markdown
Collaborator Author

@pavelzw pavelzw Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SystemTools doesn't implement Default anymore. we could go with pixi-build-backend and env!("CARGO_PKG_VERSION") but not sure thats pretty?

alternatively fix upstream in rattler-build?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaah that explains why this is needed. In that case lets not make them optional indeed and just pass them directly in the constructor! Sorry I missed it if you said it earlier!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavelzw pavelzw requested a review from baszalmstra April 7, 2026 16:13
@baszalmstra baszalmstra merged commit ad39fd3 into prefix-dev:main Apr 7, 2026
41 checks passed
@pavelzw pavelzw deleted the exclude-newer-duration branch April 7, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(config): --exclude-newer with relative time scale

4 participants