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

fix(install): invalidate manifest cache on registry change #11606

Merged
merged 10 commits into from
Jun 6, 2024

Conversation

dylan-conway
Copy link
Member

@dylan-conway dylan-conway commented Jun 4, 2024

What does this PR do?

We need to make sure manifests in the cache are invalidated when the registry for the package changes. This pr bumps our serialized manifest version to 3, and writes the registry hash + length to end of the file.

fixes #11582

How did you verify your code works?

Added a test that installs the same package from two registries.

Copy link
Contributor

github-actions bot commented Jun 4, 2024

@dylan-conway, your commit has failing tests :(

💪 1 failing tests Darwin AARCH64

  • test/js/web/streams/streams.test.js 1 failing

🐧🖥 1 failing tests Linux x64

  • test/integration/next-pages/test/next-build.test.ts 1 failing

🪟💻 4 failing tests Windows x64 baseline

  • test/cli/install/bunx.test.ts 1 failing
  • test/integration/next-pages/test/dev-server.test.ts 1 failing
  • test/js/bun/io/bun-write.test.js 1 failing
  • test/js/node/watch/fs.watchFile.test.ts 3 failing

🪟💻 5 failing tests Windows x64

  • test/cli/install/bunx.test.ts 1 failing
  • test/integration/next-pages/test/dev-server.test.ts 1 failing
  • test/js/bun/io/bun-write.test.js 1 failing
  • test/js/node/watch/fs.watchFile.test.ts 3 failing
  • test/js/web/timers/setTimeout.test.js 1 failing

View logs

@Jarred-Sumner
Copy link
Collaborator

I think we should store the length also

@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Jun 5, 2024

Like hash & length

As another sanity check

@Jarred-Sumner
Copy link
Collaborator

Let’s merge once tests run

@anru
Copy link

anru commented Jun 7, 2024

Thank you very much for this fix, looking forward to the next release to adopt bun as a package manager in our day 2 day development and CI/CD pipelines.

It is also highly likely that the nature of all the related issues listed in #11582 (perhaps except the #5029) lies in the behaviour that was fixed in current mr.

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.

Not being able to use bun install in large companies
3 participants