grammyjs / website

The grammY documentation website.
https://grammy.dev
MIT License
45 stars 102 forks source link

feat: add bun related docs #1105

Open stonega opened 3 months ago

KnorpelSenf commented 3 months ago

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.

MasedMSD commented 1 month ago

@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.

KnorpelSenf commented 1 month ago

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

winstxnhdw commented 1 month ago

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

Was i18n ever an issue?

MasedMSD commented 1 month ago

conversations

image

KnorpelSenf commented 1 month ago

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

KnorpelSenf commented 1 month ago

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

KnorpelSenf commented 1 month ago

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 commented 1 month ago

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

KnorpelSenf commented 1 month ago

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

MasedMSD commented 1 month ago

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 commented 1 month ago

@stonega You're still interested in continuing PR?