website icon indicating copy to clipboard operation
website copied to clipboard

feat: add bun related docs

Open stonega opened this issue 1 year ago • 1 comments

stonega avatar Jul 30 '24 09:07 stonega

Bun's Node compatibility is not good enough yet, so several grammY plugins are broken and cannot be used on Bun. It would be grossly misleading to teach people to set up their project with Bun, only to tell them on several other pages that they actually should not have done this.

That being said, we are going to migrate the entire ecosystem to JSR at some point in the future. JSR currently is not mature enough for that, either, but one thing it already does well is to solve the compatibility issues. It is able to transform the plugins into a Bun-compatible version, something that our current build setups can't provide. This is being tracked in https://github.com/grammyjs/grammY/issues/559.

We can get back to these changes and merge them as soon as the compatibility issues are fixed either by Bun or by us. We can keep this open for the time being.

KnorpelSenf avatar Jul 30 '24 20:07 KnorpelSenf

@KnorpelSenf The issue of adding Bun is becoming more and more pressing. At the moment even plugin conversation, which could throw errors before, is working more and more stable.

+1 from me for adding documentation for Bun

Btw, many users from Russian-speaking chat also actively use it.

MasedMSD avatar Sep 24 '24 09:09 MasedMSD

@winstxnhdw can you confirm that they have fixed their support for conversations, i18n, etc?

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

@winstxnhdw can you confirm that they have fixed their support for conversations, i18n, etc?

Was i18n ever an issue?

winstxnhdw avatar Sep 24 '24 09:09 winstxnhdw

conversations

image

MasedMSD avatar Sep 24 '24 09:09 MasedMSD

I think all plugins compiled with dnt were, but I have never used bun, it's only what people reported

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

So they finally fixed it? That's pretty good!

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

Actually, that section is pretty outdated anyway. Neither the part about Node nor the part about Deno are accurate anymore. I will fix things up in a subsequent PQ. We can keep this as-is for now.

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

@stonega what about https://grammy.dev/guide/api#type-definitions-for-the-bot-api?

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

We will also have to rework all code examples at some point. This is another thing that will be done in a subsequent PQ.

KnorpelSenf avatar Sep 24 '24 09:09 KnorpelSenf

We will also have to rework all code examples at some point. This is another thing that will be done in a subsequent PQ.

It's really not that important to rewrite all the examples. There are only a few moments when Bun implements its development tools.

For example

import { spawn } from "child_process"

and

import { spawn } from "bun"

MasedMSD avatar Oct 01 '24 13:10 MasedMSD

@stonega You're still interested in continuing PR?

MasedMSD avatar Oct 01 '24 13:10 MasedMSD

Closing due to inactivity.

rojvv avatar Nov 21 '24 19:11 rojvv