Skip to content

Conversation

@heyglassy
Copy link
Contributor

@heyglassy heyglassy commented Aug 12, 2025

TL;DR

Disables the Kernel client from running in the Bun JavaScript runtime.

Why we made these changes

To prevent Kernel from being used in an unsupported or incompatible environment, avoiding potential issues or undefined behavior.

What changed?

  • src/client.ts: Modified the Kernel client constructor to include a runtime check that throws a KernelError if Bun is detected as the current runtime.

Description generated by Mesa. Update settings

@heyglassy heyglassy requested review from juecd and rgarcia August 12, 2025 21:38
Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

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

Performed full review of 3fd6a3e...89985e3

1 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings

) {
throw new Errors.KernelError('The Bun runtime is not supported. Please use a different runtime.');
}

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem is the combination of Bun and Playwright, right? If so I think we should be more forgiving and log a warning to that effect (instead of throwing) and also give users the option to turn off the warning, e.g.

"WARNING: if you are using Playwright with Bun you will not be able to connect over CDP: {link to GitHub issue}.
Turn off this warning with KERNEL_BUN_WARNING=off"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

@heyglassy heyglassy requested a review from rgarcia August 12, 2025 23:22
@heyglassy heyglassy merged commit bba59a6 into main Aug 13, 2025
7 checks passed
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.

3 participants