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

Should top-level await + dynamic import + cyclic import causes "unsettled TLA" error? #14708

Open
xqm32 opened this issue Oct 21, 2024 · 0 comments
Labels
ecosystem Something that relates to package or framework compatibility

Comments

@xqm32
Copy link

xqm32 commented Oct 21, 2024

What version of Bun is running?

1.1.31

What platform is your computer?

Darwin 23.6.0 arm64 arm & Debian

What steps can reproduce the bug?

See nodejs/node#55468

Create following files:

  • package.json:
{
  "private": true,
  "type": "module"
}
  • foo.js:
const bar = await import("./bar.js");
console.log(bar.default);
  • bar.js:
import {} from "./foo.js";
export default "It works!";

Then run bun foo.js.

What is the expected behavior?

I don't know, but ONLY JSC based runtime/browser will output "It works!" successfully.

What do you see instead?

No response

Additional information

Behavior of other runtime:

  • Node: error on unsettled TLA
  • Deno: error on unsettled TLA.
  • Chromium: stuck on dynamic import.
  • Firefox: also stuck on dynamic import.
  • Safari: outputs "It works!" successfully.
  • Bun: outputs "It works!" successfully.
@xqm32 xqm32 added bug Something isn't working needs triage labels Oct 21, 2024
@nektro nektro added ecosystem Something that relates to package or framework compatibility and removed needs triage bug Something isn't working labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem Something that relates to package or framework compatibility
Projects
None yet
Development

No branches or pull requests

2 participants