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

resolver: fix debug mode crash in test/bundler/bun-build-api.test.ts #9140

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

nektro
Copy link
Member

@nektro nektro commented Feb 28, 2024

path being processed here is normalized here

bun/src/bun.js/javascript.zig

Lines 1717 to 1741 in bf3dbda

const buster_name = name: {
if (std.fs.path.isAbsolute(normalized_specifier)) {
if (std.fs.path.dirname(normalized_specifier)) |dir| {
// Normalized with trailing slash
break :name bun.strings.normalizeSlashesOnly(
&specifier_cache_resolver_buf,
if (dir.len == 1) dir else normalized_specifier[0 .. dir.len + 1],
'/',
);
}
}
var parts = [_]string{
source_to_use,
normalized_specifier,
bun.pathLiteral("../"),
};
break :name bun.path.joinAbsStringBufZTrailingSlash(
jsc_vm.bundler.fs.top_level_dir,
&specifier_cache_resolver_buf,
&parts,
.auto,
);
};
and so will always contain / even on windows

@Jarred-Sumner
Copy link
Collaborator

cc @paperdave

@Jarred-Sumner Jarred-Sumner merged commit 331d079 into main Feb 28, 2024
20 checks passed
@Jarred-Sumner Jarred-Sumner deleted the nektro-patch-1 branch February 28, 2024 06:22
Copy link
Contributor

@nektro 1 files with test failures on bun-darwin-aarch64:

View test output

#83ec5aa7be907a90174b2b202305a24506f894f8

Copy link
Contributor

@nektro 1 files with test failures on linux-x64-baseline:

View test output

#83ec5aa7be907a90174b2b202305a24506f894f8

Copy link
Contributor

Copy link
Contributor

❌🪟 @nektro, there are 43 test regressions on Windows x86_64

  • test\bundler\esbuild\packagejson.test.ts
  • test\cli\run\transpiler-cache.test.ts
  • test\cli\run\require-cache.test.ts
  • test\integration\mysql2\mysql2.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\resolve\resolve-error.test.ts
  • test\js\bun\resolve\resolve.test.ts
  • 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\test\mock\mock-module.test.ts
  • test\js\bun\util\inspect.test.js
  • 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\missing-module.test.js
  • 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\jsonwebtoken\claim-private.test.js
  • 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\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\js\web\workers\worker.test.ts

Full Test Output

paperclover added a commit that referenced this pull request Feb 28, 2024
Jarred-Sumner added a commit that referenced this pull request Feb 28, 2024
…trailing slash" (#9144)

* okaaaaaaaay

* Revert "resolver: fix debug mode crash in test/bundler/bun-build-api.test.ts (#9140)"

This reverts commit 331d079.

* correctly fix the cache bust bug

this was introduced a couple of commits ago in my random fixes,
where i put the wrong fix to another directory caching bug.

i still stand by the assertion in place despite it causing many people
issues. it's precense will prevent subtle module resolutions failures.

* add an extra comment

* fix building a release build locally

* add a better test case for 3216

* staging

* fix mac issues

* ok

---------

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.

2 participants