Repository navigation
Conversation
Collaborator
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
DonIsaac
force-pushed
the
don/fix/bunfig-preload
branch
from
January 14, 2025 04:11
af01c9d to
58d60bc
Compare
DonIsaac
force-pushed
the
01-13-fix_bunfig_resolve_preloads_relative_to_bunfig.toml_
branch
from
January 14, 2025 04:11
39e22a9 to
6ce9749
Compare
DonIsaac
force-pushed
the
01-13-fix_bunfig_resolve_preloads_relative_to_bunfig.toml_
branch
from
January 14, 2025 04:17
c82d359 to
aa2c126
Compare
small-angel
reviewed
Jan 14, 2025
| } | ||
|
|
||
| /// Like `std.path.isAbsolute`, but allows posix paths on Windows. | ||
| pub fn isAbsoluteCrossPlatform( |
Contributor
There was a problem hiding this comment.
delete this function. it's name is misleading, comment is incorrect, and behavior is already covered in std.fs.path.isAbsolute
small-angel
reviewed
Jan 14, 2025
| const os = bun.Environment.os; | ||
| const strings = bun.strings; | ||
|
|
||
| pub fn isRelativePathCrossPlatform(path: []const u8) bool { |
Contributor
There was a problem hiding this comment.
this function implementation is
- better placed in
bun.path.Platform., that way it doesn't readbun.Environment.osand can use related utilities for slash direction and so on - does not handle
./hellosince it has a length of 6, hitting the else, and then it never checks. i think the 2 => branch can be eliminated entirely - incorrectly named since
hello.txtis a relative path in most contexts (for example, in bash or the argument tofs.open()).
1 of 2 tasks
Contributor
Author
|
Closed in favor of #18908 |
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Before, relative preloads were always resolved to the transpiler's root director. Preloads now store what path they were loaded from.
The preload list is also now an
ArrayListUnmanagedinstead of a slice. We kept clobbering existing slices, leading to memory leaks. This PR reduces, but does not fully fix, all such leaks.How did you verify your code works?
There are tests.