Skip to content

fix(install): handle transitive folder dependencies - #10445

Merged
dylan-conway merged 46 commits into
mainfrom
dylan/link-transitive-folder-dep
Jun 15, 2024
Merged

dylan-conway merged 46 commits into
mainfrom
dylan/link-transitive-folder-dep

Conversation

@dylan-conway

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

Copy link
Copy Markdown
Member

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

@github-actions

github-actions Bot commented Apr 23, 2024 •

Copy link
Copy Markdown
Contributor

❌ @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

Comment thread src/install/dependency.zig Resolved
Comment thread src/install/install.zig Resolved
Comment thread src/install/install.zig Resolved
Comment thread src/install/install.zig Resolved

@Jarred-Sumner Jarred-Sumner left a comment

Copy link
Copy Markdown
Collaborator

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 ready for review June 13, 2024 06:19
Comment thread src/install/lockfile.zig Resolved
Comment thread src/install/install.zig Resolved
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/routify@3.0.0-next.228 bun install cannot resolve local file dependencies

2 participants