Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm install --frozen-lockfile updates modified time of pnpm-lock.yaml and root dir each time it runs even without changes #6158

Closed
artur-ptaszek-mck opened this issue Mar 1, 2023 · 4 comments · Fixed by #6260
Assignees
Milestone

Comments

@artur-ptaszek-mck
Copy link

pnpm version: 7.28.0

Code to reproduce the issue:

It happens in any project regardless of packages in it. package.json has only rimraf as a dependency.

~/Projects/pnpm-bug-report
➞  stat pnpm-lock.yaml
16777220 104927827 -rw-r--r-- 1 artur_ptaszek staff 0 296 "Mar  1 15:13:12 2023" "Mar  1 15:13:11 2023" "Mar  1 15:13:11 2023" "Mar  1 15:13:11 2023" 4096 8 0 pnpm-lock.yaml

~/Projects/pnpm-bug-report
➞  pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 393ms

~/Projects/pnpm-bug-report
➞  stat pnpm-lock.yaml
16777220 104927846 -rw-r--r-- 1 artur_ptaszek staff 0 296 "Mar  1 15:13:26 2023" "Mar  1 15:13:24 2023" "Mar  1 15:13:24 2023" "Mar  1 15:13:24 2023" 4096 8 0 pnpm-lock.yaml

Expected behavior:

If pnpm reponse with Already up to date, then shouldn't affect both root catalog and pnpm-lock.yaml in any kind.

Actual behavior:

pnpm install --frozen-lockfile updates modified time of pnpm-lock.yaml and root dir each time it runs even without changes.

Additional information:

  • node -v prints: v18.14.0
  • Windows, macOS, or Linux?: macOS
@Macariel
Copy link

Macariel commented Mar 3, 2023

Happens on Linux as well.
Downgrading to 7.27.0 fixes the problem.
Unfortunately this small change results in an endless loop for us, as we have file watchers on this file, which in turn call pnpm install --frozen-lockfile again 🙈

@egg-r
Copy link

egg-r commented Mar 3, 2023

We started noticing this too and reverted back to a previous version. This caused Warnings with caching tasks used in our Azure DevOps pipelines as the Key (hash of the lockfile) changed between start and finish.

@artur-ptaszek-mck
Copy link
Author

I checked with the latest v7.30.0. Issue still exists.

@zkochan
Copy link
Member

zkochan commented Mar 20, 2023

It is caused by this PR: #6110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants