-
Notifications
You must be signed in to change notification settings - Fork 777
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
Remove Bun support #8039
base: main
Are you sure you want to change the base?
Remove Bun support #8039
Conversation
🦋 Changeset detectedLatest commit: 16a5042 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-wrangler-8039 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8039/npm-package-wrangler-8039 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-wrangler-8039 dev path/to/script.js Additional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-workers-bindings-extension-8039 -O ./cloudflare-workers-bindings-extension.0.0.0-vad1e093c7.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vad1e093c7.vsix create-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-create-cloudflare-8039 --no-auto-update @cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-kv-asset-handler-8039 miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-miniflare-8039 @cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-pages-shared-8039 @cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-unenv-preset-8039 @cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-vite-plugin-8039 @cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-vitest-pool-workers-8039 @cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-workers-editor-shared-8039 @cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-workers-shared-8039 @cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13200984815/npm-package-cloudflare-workflows-shared-8039 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
@@ -41,6 +42,13 @@ import type { C3Args, C3Context } from "types"; | |||
const { npm } = detectPackageManager(); | |||
|
|||
export const main = async (argv: string[]) => { | |||
if (process.versions.bun || npm === "bun") { | |||
console.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a regression in Bun v1.2.0 that impacted this, but that regression was fixed in Bun v1.2.1. I manually verified it works without error in Bun v1.2.1 and Bun v1.2.2 (and that it regressed in Bun v1.2.0, which matches what you saw in the CI runs). We are adding more tests from Node.js' test suite to catch bugs like this in the future.
Is this warning still needed? We will fix anything else that comes up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. Bun’s continued disregard for ecosystem compatibility puts burden on third party maintainers, as well as the community where often “use Node.js” is the solution to most issues once Bun is discovered to be used.
In my opinion, until Bun commits to join something like WinterTC and work closely with other runtimes before implementing ecosystem breaking or diverging features, I don’t imagine this burden will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the error has been changed to a warning, I'd personally still go with the error so users are aware - a good portion of the questions we get in the Discord could be resolved by the user if they read the message.
And with bun, most of the time the solution is to use node, and things magically start working.
Fixes https://jira.cfdata.org/browse/DEVX-1621
Adds a fast fail error to Wrangler when run using Bun, as well as removing Bun support from C3. Bun is not supported by Wrangler or Miniflare, and so allowing users to use Bun to run C3 was not setting people up for success—we see issues come in relatively frequently about people trying to use Bun with Wrangler/Miniflare, thinking it'd work because of C3's support.