gitpod-io / gitpod-io/gitpod

Rust: Because of wrong modified timestamp cargo rebuilds every time

Open
#524 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: ws-daemon meta: never-stale team: workspace type: bug
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Describe the bug
Between workspace restarts, the precision of the 'modified' timestamp on files under /workspace degrades from nanosecond to second precision.

As of now, cargo relies on this timestamp to detect dirty dependencies. The effect is that cargo rebuilds the whole project including all dependencies on each restart because it things the present artifacts are outdated.

To Reproduce

  1. Create new workspace
  2. touch test
  3. stat test
  4. Stop and restart workspace
  5. stat test

Expected behavior
Workspace should have identical timestamps after restart.

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

Reproduce the timestamp change in a workspace using the listed touch and stat steps, comparing the file before and after a restart. Read the linked Cargo fingerprint logic to understand how modified timestamps affect dependency freshness. Done means files under /workspace retain identical timestamp precision across restarts and cargo no longer rebuilds the project unnecessarily.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.