-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[install] assorted fixes & improvements #2011
Conversation
- take `peerDependencies` into account during package placement - do not recursively resolve `workspaces` (matches `npm`) - link binaries to non-root packages correctly - prune empty nodes during dependency tree construction - support non-standard `workspace:` specifier
// verilog.tar.gz | ||
// verilog/repo | ||
'v' => { | ||
if (isTarball(dependency)) return .tarball; | ||
if (isGitHubRepoPath(dependency)) return .github; | ||
return .npm; | ||
if (dependency.len == 1) return .dist_tag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
} else { | ||
if (this.global_bin_dir.fd >= std.math.maxInt(std.os.fd_t)) { | ||
this.err = error.MissingGlobalBinDir; | ||
return; | ||
} | ||
|
||
@memcpy(&target_buf, this.global_bin_path.ptr, this.global_bin_path.len); | ||
std.mem.copy(u8, &target_buf, this.global_bin_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std.mem.copy is slower than memcpy
but memcpy musn't overlap
we probably should have a wrapper that makes this stuff safer honestly
like a
bun.concat(dest, &.{"a", "b", "c", "d"})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, I was just going for consistency for all usages within this function - will try and make that helper function now.
Thank you |
- take `peerDependencies` into account during package placement - do not recursively resolve `workspaces` (matches `npm`) - link binaries to non-root packages correctly - prune empty nodes during dependency tree construction - support non-standard `workspace:` specifier
peerDependencies
into account during package placementworkspaces
(matchesnpm
)workspace:
specifier