Skip to content

fix: Set the modification time of any file we change#2096

Merged
wolfv merged 1 commit intoconda:mainfrom
hunger:push-xzutxxstkook
Feb 23, 2026
Merged

fix: Set the modification time of any file we change#2096
wolfv merged 1 commit intoconda:mainfrom
hunger:push-xzutxxstkook

Conversation

@hunger
Copy link
Copy Markdown
Collaborator

@hunger hunger commented Feb 20, 2026

Description

This fixes pyc files not getting updated as we patch the py-file.

I choose a modification time which is bigger than the modification time, but that is the same for all files we change to keep the file tree more reproducible.

Fixes prefix-dev/rattler-build#2147

How Has This Been Tested?

by trying it out :-)

AI Disclosure

  • AI generated contents: Claude helped to write the tests.

AI Tool: Opus 4.6

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.

Copy link
Copy Markdown
Collaborator

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

If @wolfv likes this approach Im happy!

Comment thread crates/rattler/src/install/link.rs Outdated
@hunger
Copy link
Copy Markdown
Collaborator Author

hunger commented Feb 20, 2026

New and improved: No more eprintln, Metadata is spelled correctly and I added tests to make sure the mtime does change on files we modify and does not change for files we leave alone.

@wolfv
Copy link
Copy Markdown
Contributor

wolfv commented Feb 20, 2026

yeah works for me!

@hunger
Copy link
Copy Markdown
Collaborator Author

hunger commented Feb 20, 2026

... and rustfmt the entire thing :-(

Comment thread crates/rattler/src/install/mod.rs Outdated
Comment thread crates/rattler/src/install/mod.rs Outdated
Comment thread crates/rattler/src/install/mod.rs Outdated
Comment thread crates/rattler/src/install/mod.rs Outdated
This fixes pyc files not getting updated as we patch the
py-file.

I choose a modification time which is bigger than the modification
time, but that is the same for all files we change to keep the
file tree more reproducible.
@hunger
Copy link
Copy Markdown
Collaborator Author

hunger commented Feb 23, 2026

@wolfv Thanks for catching all this! It's fixed now.

@wolfv wolfv enabled auto-merge (squash) February 23, 2026 16:54
@wolfv wolfv merged commit 3afcc8b into conda:main Feb 23, 2026
18 of 21 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 23, 2026
@hunger hunger deleted the push-xzutxxstkook branch February 24, 2026 08:55
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.

rattler-build seems not to be substituting prefix when installing python 3.11.14 hd63d673_3_cpython dep

3 participants