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

feat: bun related docs (@stonega) #1129

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: bun related docs (@stonega) #1129

wants to merge 12 commits into from

Conversation

MasedMSD
Copy link
Collaborator

@MasedMSD MasedMSD commented Oct 1, 2024

Originally PR was created by @stonega, but it looks like he's not going to continue with this PR. So, I think we should mention Bun as a possible way to work with a bot, even though Bun has a large number of issues. Also Bun finally supports conversations plugin and a decent part of Russian language chat users use it for their projects.

I made some changes and added Bun mentions to the hosting files documentation

- changed bot.ts to index.ts
- mention bun at hosting docs
Copy link

github-actions bot commented Oct 1, 2024

@github-actions github-actions bot temporarily deployed to pull request October 1, 2024 13:47 Inactive
site/docs/guide/getting-started.md Show resolved Hide resolved
site/docs/guide/introduction.md Outdated Show resolved Hide resolved
@MasedMSD
Copy link
Collaborator Author

MasedMSD commented Oct 2, 2024

Should we leave index.ts or should we tell the user to create a bot.ts file each time in order for the NodeJS and Deno examples to be the same?

@KnorpelSenf
Copy link
Member

I have now wasted more time on this than I ever wanted, maybe I'll get back to this in a week or so

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

The bottom line of this is still that whatever we do with the tutorial, the output must look exactly like

Create a new empty text file, e.g. called `bot.ts`.
Your folder structure should now look like this:
```asciiart:no-line-numbers
.
├── bot.ts
├── node_modules/
├── package.json
├── package-lock.json
└── tsconfig.json
```
and the file contents need to be the same, too. I still do not really care how that is achieved, the point is that as long as the bun guide does not lead to the correct setup, then this cannot be merged.

@github-actions github-actions bot temporarily deployed to pull request October 15, 2024 15:41 Inactive
@MasedMSD
Copy link
Collaborator Author

I'll get into this page in more detail tomorrow

@KnorpelSenf
Copy link
Member

Remember to merge main in order to fix CI

@KnorpelSenf
Copy link
Member

Scratch that, it already happened

@KnorpelSenf
Copy link
Member

I even did it myself *facepalm*

@github-actions github-actions bot temporarily deployed to pull request October 15, 2024 19:31 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 16, 2024 09:48 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 16, 2024 09:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 16, 2024 11:11 Inactive
Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

This still does not create the same TS config as tsc --init if I understand this correctly

@MasedMSD
Copy link
Collaborator Author

Unfortunately we can't fix it. We will have to ask the user to change it manually every time.
But I don't understand the point of this, because everything works with the current tsconfig O.O

@KnorpelSenf
Copy link
Member

Yeah but I don't want to go through all the code examples and make sure that they compile even with the non-standard TS config that bun introduces. It can be fixed very easily by running tsc --init in the getting started guide.

@github-actions github-actions bot temporarily deployed to pull request November 4, 2024 07:28 Inactive
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
site/docs/guide/getting-started.md Outdated Show resolved Hide resolved
@quadratz
Copy link
Contributor

quadratz commented Nov 5, 2024

@KnorpelSenf : Yeah but I don't want to go through all the code examples and make sure that they compile even with the non-standard TS config that bun introduces. It can be fixed very easily by running tsc --init in the getting started guide.

@MasedMSD: But I don't understand the point of this, because everything works with the current tsconfig O.O

I am agree with @MasedMSD. I don't see any problem with the default generated tsconfig.json. Pretty sure it works well with our examples.

site/docs/guide/introduction.md Outdated Show resolved Hide resolved
site/docs/guide/introduction.md Outdated Show resolved Hide resolved
site/docs/hosting/firebase.md Outdated Show resolved Hide resolved
@KnorpelSenf
Copy link
Member

@KnorpelSenf : Yeah but I don't want to go through all the code examples and make sure that they compile even with the non-standard TS config that bun introduces. It can be fixed very easily by running tsc --init in the getting started guide.

@MasedMSD: But I don't understand the point of this, because everything works with the current tsconfig O.O

I am agree with @MasedMSD. I don't see any problem with the default generated tsconfig.json. Pretty sure it works well with our examples.

Then please go through them and verify this. Also, please test all future changes to the docs for bun compatibility. I don't care what the config file contains, I just won't double the time I spend on code examples just to make a few bun users happy.

@MasedMSD
Copy link
Collaborator Author

MasedMSD commented Nov 6, 2024

Fine, so we going to use this solution?

Co-authored-by: Qz <[email protected]>
Co-authored-by: Winston H. <[email protected]>
@github-actions github-actions bot temporarily deployed to pull request November 6, 2024 16:55 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 6, 2024 16:59 Inactive
@KnorpelSenf
Copy link
Member

Only as soon as we find somebody who actually puts in the work and makes sure that the code examples work. I don't want to merge docs that don't type-check because then I'm gonna be the one who has to deal with all the complaints.

If somebody is willing to

  • make sure that the current docs type-check, and
  • make sure that all future docs type-check

then we can ship docs that use a new TS config setup.

@MasedMSD
Copy link
Collaborator Author

MasedMSD commented Nov 6, 2024

@KnorpelSenf It would be useful to create some package for easy unit testing of the bot.
I don't think that's possible given the flood handling by telegram

@KnorpelSenf
Copy link
Member

Is that in any way related to the current pull request?

@MasedMSD
Copy link
Collaborator Author

MasedMSD commented Nov 6, 2024

I mean that we should have some kind of tests to make sure that the bot and the code work. For example, as for the situation now, when we can't be sure that bun will pass all type-checks

@KnorpelSenf
Copy link
Member

That's why you have to test it, or adjust the TS config. But I'm beginning to repeat myself a little

@winstxnhdw
Copy link
Member

winstxnhdw commented Nov 6, 2024

I mean that we should have some kind of tests to make sure that the bot and the code work. For example, as for the situation now, when we can't be sure that bun will pass all type-checks

It’ll be hard to write integration tests for Bun and grammY because the existing test suite is in Deno. We’d have to spend a lot of time instrumenting some Docker CI test just specifically for Bun, and I am not sure if it’s worth the effort.

@KnorpelSenf
Copy link
Member

There's no need to actually run any tests, why do you think this? I can't follow

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.

5 participants