rust-lang / rust-lang/cargo

atime-on-use instead of mtime-on-use

Open
#17,232 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-rebuild-detection C-feature-request S-needs-info
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Problem

mtime is explicitly a modification time, updating it when nothing's actually changed can confuse backup tools, dependency analysis systems, file indexers, and so on.

Proposed Solution

atime is explicitly an access-time field. It doesn't signal modification so doesn't have the same side effects that updating mtime has. While many Linux systems disable or throttle atime updtes, atime can be updated explicitly updated using utimes() in the same circumstances mtime is updated.

Notes

I'd expect updating atime instead of mtime in this feature to be a trivial enhancement.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Cargo implementation and tests for the feature that currently updates mtime, then inspect how utimes() is used or could be used in that path. Confirm which existing tests cover timestamp updates. Done means the feature updates atime rather than mtime when nothing has changed, with tests showing the expected timestamp behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.