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): handle transitive folder dependencies #10445

Merged
merged 46 commits into from
Jun 15, 2024

Conversation

dylan-conway
Copy link
Member

@dylan-conway dylan-conway commented Apr 22, 2024

What does this PR do?

Sometimes packages are published with file: dependencies. The pr installs them with symlinks, without erroring if the target does not exist

fixes #10324
fixes #11519

How did you verify your code works?

added tests

Copy link
Contributor

github-actions bot commented Apr 23, 2024

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

💻 2 failing tests Darwin x64 baseline

  • test/js/web/fetch/fetch.stream.test.ts 1 failing
  • test/js/web/websocket/websocket.test.js 1 failing

🐧🖥 1 failing tests Linux x64 baseline

  • test/integration/mysql2/mysql2.test.ts 2 failing

🪟💻 1 failing tests Windows x64 baseline

  • test/cli/install/registry/bun-install-registry.test.ts 1 failing

🪟💻 3 failing tests Windows x64

  • test/cli/install/overrides.test.ts 1 failing
  • test/integration/next-pages/test/dev-server.test.ts 1 failing
  • test/js/bun/http/serve-body-leak.test.ts 1 failing

View logs

Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

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

Thank you for writing these tests

I think everything in the PR fine except for the verify symlink part. That part should be changed to either:

  • do no checks at all, just verify package.json version like we do elsewhere
  • verify each symlink by re-creating it. it's just as expensive to create a bunch of symlinks as it is to check if those symlinks are valid. and, checking if symlinks are valid is a TOCTOU race condition

@dylan-conway dylan-conway marked this pull request as draft April 25, 2024 00:02
@dylan-conway dylan-conway marked this pull request as ready for review June 13, 2024 06:19
@dylan-conway dylan-conway merged commit eedb3e5 into main Jun 15, 2024
48 of 53 checks passed
@dylan-conway dylan-conway deleted the dylan/link-transitive-folder-dep branch June 15, 2024 07:08
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.

bun install fails to install @roxi/[email protected] bun install cannot resolve local file dependencies
2 participants