-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Description
Description
Bun is experiencing a fatal crash (Segmentation Fault / Illegal Instruction) when attempting to install a dependency located within a subdirectory of a remote Git repository. While Bun supports standard Git dependencies, the additional path: or subdirectory resolution logic appears to trigger a memory or assertion failure during the cloning/hoisting phase.
🔍 Observed Issue
- The Crash: Running
bun installwith a subdirectory-based Git dependency causes Bun to exit immediately with a core dump orpanic: Internal assertion failure. - The Trigger: This specifically occurs when using the syntax for sub-packages within a monorepo, e.g.:
"dependency": "git+https://github.com/user/repo.git#path:packages/sub-package" - Current State: The package manager fails to properly resolve the
package.jsoninside the specified path, leading to a crash inPackageManagerTask.zig.
✨ Expected Behavior
Bun should:
- Clone the repository into the local cache.
- Navigate to the specified subdirectory path.
- Install the package and its dependencies as a standard linked dependency, similar to
pnpmornpm.
🛠️ Reproduction Steps
- Create a new project with
bun init. - Add a Git dependency that points to a subdirectory:
bun add git+[https://github.com/example/monorepo.git#path:libs/my-lib](https://github.com/example/monorepo.git#path:libs/my-lib)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels