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: random things #9046

Merged
merged 6 commits into from
Feb 28, 2024
Merged

windows: random things #9046

merged 6 commits into from
Feb 28, 2024

Conversation

paperclover
Copy link
Member

What does this PR do?

  • dlopen and napi work (sharp passes)
  • fixed bundler regression idk how i got merged before (i totally broke it)
  • nerf some tests for the windows ci

CString utf8 = filename.utf8();
HMODULE handle = LoadLibraryA(utf8.data());
HMODULE handle;
printf("Trying to load %s\n", filename.utf8().data());
Copy link
Collaborator

Choose a reason for hiding this comment

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

printf

LPSTR messageBuffer = nullptr;
size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, errorId, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL);
WTF::String msg = makeString("LoadLibrary failed: ", WTF::String(messageBuffer, size));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
WTF::String msg = makeString("LoadLibrary failed: ", WTF::String(messageBuffer, size));
WTF::String msg = makeString("LoadLibrary failed: "_s, WTF::StringView(messageBuffer, size));

// With trailing slash
break :name if (dir.len == 1) dir else normalized_specifier[0 .. dir.len + 1];
// Normalized with trailing slash
break :name bun.path.normalizeStringBuf(
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we always need to do this extra work?

src/bundler.zig Outdated
break :name if (dir.len == 1) dir else entry_point[0 .. dir.len + 1];
// Normalized with trailing slash
break :name bun.path.normalizeStringBuf(
if (dir.len == 1) dir else entry_point[0 .. dir.len + 1],
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we always need to do this extra work?

@@ -338,8 +338,10 @@ it("should remove all cache", async () => {
import { tmpdir } from "os";
it("bun pm migrate", async () => {
const test_dir = join(tmpdir(), "contoso-test" + Math.random().toString(36).slice(2));
console.log("test_dir", test_dir);
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you mean to commit this?


cpSync(join(import.meta.dir, "migration/contoso-test"), test_dir, { recursive: true });
throw new Error("stop");
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you mean to commit this?

Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

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

probably should've marked this as draft

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Copy link
Contributor

github-actions bot commented Feb 22, 2024

✅ test failures on bun-darwin-x64 have been resolved.

#5855dcd1048bc5fa86762817713dcdc080df3ed0

Copy link
Contributor

github-actions bot commented Feb 22, 2024

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

  • test\bundler\bun-build-api.test.ts
  • test\bundler\bundler_edgecase.test.ts
  • test\cli\run\env.test.ts
  • test\cli\run\require-cache.test.ts
  • test\cli\run\transpiler-cache.test.ts
  • test\js\bun\dns\resolve-dns.test.ts
  • test\js\bun\http\fetch-file-upload.test.ts
  • test\js\bun\resolve\import-meta.test.js
  • test\js\bun\shell\bunshell-file.test.ts
  • test\js\bun\shell\shelloutput.test.ts
  • test\js\bun\shell\throw.test.ts
  • test\js\bun\http\bun-server.test.ts
  • test\js\node\dns\node-dns.test.js
  • test\js\node\env-windows.test.ts
  • test\js\node\process\process-args.test.js
  • test\js\node\process\process.test.js
  • test\js\node\util\node-inspect-tests\parallel\util-inspect.test.js
  • test\js\node\worker_threads\worker_threads.test.ts
  • test\js\third_party\body-parser\express-body-parser-test.test.ts
  • test\js\third_party\es-module-lexer\es-module-lexer.test.ts
  • test\js\third_party\socket.io\socket.io-close.test.ts
  • test\js\third_party\socket.io\socket.io-connection-state-recovery.test.ts
  • test\js\third_party\socket.io\socket.io-handshake.test.ts
  • test\js\third_party\socket.io\socket.io-messaging-many.test.ts
  • test\js\third_party\socket.io\socket.io-middleware.test.ts
  • test\js\third_party\socket.io\socket.io-namespaces.test.ts
  • test\js\third_party\socket.io\socket.io-server-attachment.test.ts
  • test\js\third_party\socket.io\socket.io-socket-middleware.test.ts
  • test\js\third_party\socket.io\socket.io-socket-timeout.test.ts
  • test\js\third_party\socket.io\socket.io-utility-methods.test.ts
  • test\js\third_party\socket.io\socket.io.test.ts
  • test\js\web\fetch\body-stream.test.ts
  • test\js\web\timers\performance.test.js
  • test\js\web\timers\setTimeout.test.js
  • test\js\web\websocket\websocket.test.js
  • test\regression\issue\08095.test.ts
  • test\regression\issue\08757.test.ts
  • test\transpiler\runtime-transpiler.test.ts
  • test\transpiler\template-literal.test.ts
  • test\js\web\workers\worker.test.ts

Full Test Output

@paperclover paperclover marked this pull request as draft February 22, 2024 23:59
@paperclover paperclover marked this pull request as ready for review February 27, 2024 09:32
@Jarred-Sumner Jarred-Sumner merged commit c54844b into main Feb 28, 2024
27 of 31 checks passed
@Jarred-Sumner Jarred-Sumner deleted the dave/win/dlopen branch February 28, 2024 00:30
@Jarred-Sumner
Copy link
Collaborator

Thank you

nikeee pushed a commit to nikeee/bun that referenced this pull request Feb 28, 2024
* random things

* fix reliability of loading napi stuff

* fix posix build

* a
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.

2 participants