Skip to content
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

windows: make more windows tests pass #9370

Merged
merged 31 commits into from Mar 23, 2024
Merged

windows: make more windows tests pass #9370

merged 31 commits into from Mar 23, 2024

Conversation

paperdave
Copy link
Collaborator

@paperdave paperdave commented Mar 12, 2024

some changes to moving spawn({ cmd: [] }) to spawn([], {}) are done because our workspaces type definitions are broken :(

making use our open in more places than before because i think our synchronous open is better than libuv's

Fixes #6820

Copy link

github-actions bot commented Mar 12, 2024

Copy link

github-actions bot commented Mar 12, 2024

❌🪟 @paperdave, there are 14 test regressions on Windows x86_64

  • test\cli\hot\hot.test.ts
  • test\cli\install\bun-run-bunfig.test.ts
  • test\cli\install\bunx.test.ts
  • test\cli\install\registry\bun-install-registry.test.ts
  • test\js\bun\console\console-iterator.test.ts
  • test\js\bun\glob\scan.test.ts
  • test\js\bun\resolve\resolve.test.ts
  • test\js\bun\shell\leak.test.ts
  • test\js\node\dns\node-dns.test.js
  • test\js\node\stream\node-stream.test.js
  • test\js\web\fetch\body-stream.test.ts
  • test\js\third_party\postgres\postgres.test.ts
  • test\js\web\timers\setTimeout.test.js
  • test\js\web\workers\worker.test.ts

Full Test Output

Copy link

github-actions bot commented Mar 12, 2024

// powershell `install.ps1` was used to install.

const image_path = bun.windows.exePathW();
const image_dirname = image_path[0..(std.mem.lastIndexOfScalar(u16, image_path, '\\') orelse unreachable)];

if (!std.mem.endsWith(u16, image_dirname, comptime bun.strings.literal(u16, "\\bun\\bin")))
if (!std.mem.endsWith(u16, image_dirname, comptime bun.strings.literal(u16, "bun\\bin")))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.bun\bin but also handle some form of user-install where it is organized in a folder named bun

const dir = try std.fs.cwd().makeOpenPath(dirname, .{ .access_sub_paths = true });
break :brk bun.toLibUVOwnedFD(dir.fd);
var dir = try std.fs.cwd().makeOpenPath(dirname, .{ .access_sub_paths = true });
errdefer dir.close();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Collaborator

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There's a build failure but the code is unreachable

@Jarred-Sumner
Copy link
Collaborator

What tests does this fix?

@@ -17,7 +17,6 @@
const { chmod, copyFile, lstat, mkdir, opendir, readlink, stat, symlink, unlink, utimes } = require("node:fs/promises");
const { dirname, isAbsolute, join, parse, resolve, sep } = require("node:path");

const SafePromiseAll = Promise.all;
const PromisePrototypeThen = Promise.prototype.then;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hilarious thing about this is .$then exists and so it's less safe than the actual

@Jarred-Sumner Jarred-Sumner merged commit 73a55cf into main Mar 23, 2024
26 of 31 checks passed
@Jarred-Sumner Jarred-Sumner deleted the dave/win/2024-03-11 branch March 23, 2024 06:40
zackradisic pushed a commit that referenced this pull request Mar 25, 2024
* run-eval.test.ts

* transpiler-cache.test.ts

* node net

* some open things

* a

* a

* yikes

* incredible

* run it back

* a

* this code is what i like to call, incorrect

* ok its all worng

* remove an assertion that is wrong again

* update test things and rebase

* performance test

* mark filesink with mkfifo as todo. see #8166

* hehe

* not done

* awa

* fs test pass

---------

Co-authored-by: Jarred Sumner <[email protected]>
Co-authored-by: Jarred Sumner <[email protected]>
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.

respect Windows "Hidden" file attribute before it is too late.
4 participants