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
feat: Windows + CMake Build System #4410
Conversation
❌ @paperdave 1 files with test failures on linux-x64:
|
❌ @paperdave 1 files with test failures on linux-x64-baseline:
|
❌ @paperdave 9 files with test failures on bun-darwin-x64-baseline:
|
a3b9307
to
3775081
Compare
✅ |
❌ @paperdave 6 files with test failures on bun-darwin-aarch64:
|
Works around a Windows issue
✅ #838c85c821f89aa0b99a6ec62997e78cea1367e1 |
@@ -2032,7 +2037,7 @@ pub const DNSResolver = struct { | |||
.code = bun.String.static(err.code()), | |||
.message = bun.String.static(err.label()), | |||
}; | |||
|
|||
defer ip_slice.deinit(); |
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.
TODO: this is sus
…o jarred/prepare-for-libuv
@@ -145,7 +145,7 @@ pub const Arguments = struct { | |||
var paths = [_]string{ cwd, filename }; | |||
const outpath = try std.fs.path.resolve(allocator, &paths); | |||
defer allocator.free(outpath); | |||
var file = try std.fs.openFileAbsolute(outpath, std.fs.File.OpenFlags{ .mode = .read_only }); | |||
var file = try bun.openFileZ(&try std.os.toPosixPath(outpath), std.fs.File.OpenFlags{ .mode = .read_only }); |
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.
TODO: this shouldn't be posix
supported_method = .copyfile; | ||
supported_method_to_use = .copyfile; | ||
}, | ||
// error.ENXIO => { |
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.
TODO:!
const NetworkChannel = sync.Channel(*NetworkTask, .{ .Static = 8192 }); | ||
|
||
// Windows seems to stack overflow in debug builds due to the size of these allocations. | ||
const TaskChannel = sync.Channel(Task, .{ .Static = 4096 / (if (Environment.isWindows) 16 else 1) }); |
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.
todo: remove this diff
src/install/install.zig
Outdated
} | ||
|
||
pub fn sleep(this: *PackageManager) void { | ||
if (this.wait_count.swap(0, .Monotonic) > 0) return; | ||
Output.flush(); | ||
_ = this.waiter.wait() catch 0; | ||
bun.Mimalloc.mi_collect(false); |
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.
collect is bad
It was added in oven-sh#4410. The `src` directory is not supposed to be a part of the path. Signed-off-by: Darshan Sen <raisinten@gmail.com>
Running the script ended with this error: ```sh $ bash ./scripts/setup.sh ... ninja: error: loading 'build.ninja': No such file or directory ``` It happens because the `build.ninja` file is inside the `build` directory, not the current directory, so `ninja` is not able to detect the presence of that file and run the builds. The error started happening in oven-sh#4410, where this script was introduced. Signed-off-by: Darshan Sen <raisinten@gmail.com>
What does this PR do?
don't have time before bun 1.0 to learn enough to get good at windows I/O
so we will use libuv on Windows
this is the prep code, does nothing but hopefully it's mergeable and then we can implement
FilePoll
,PollRef
and then various functions.How did you verify your code works?
it doesn't work