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

Export type that lists names of supported parsers #19

Open
nene opened this issue Jan 8, 2024 · 4 comments
Open

Export type that lists names of supported parsers #19

nene opened this issue Jan 8, 2024 · 4 comments

Comments

@nene
Copy link
Owner

nene commented Jan 8, 2024

So that prettier-plugin-embed would not need to update its parser list each time new dialect is added.

@Sec-ant
Copy link

Sec-ant commented Jan 8, 2024

Oh sorry I just realized I forgot to also update the prettier option definition here: https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src%2Fembedded%2Fsql%2Foptions.ts#L84-L91

So the new parsers would probably still not work. And only exporting types looks also not enough because I still have to manually define these options.

However requiring a plugin to do some additional work to cope with another plugin seems not a good idea. I'm considering taking a snapshot of all the versions of 3rd party language-specifc plugins in each release and find a way to generate warning messages if the installed version is newer than the snapshot version.

@nene
Copy link
Owner Author

nene commented Jan 8, 2024

Well, on the good side, I'm not really expecting to be adding new dialects any time soon. Implementing full support for PostgreSQL and MySQL will likely be about a year's worth of effort.

@nene
Copy link
Owner Author

nene commented Jan 8, 2024

Though... one never knows. There are some SQL dialects that are very similar. Like in the case of MariaDB and MySQL, so including a support for such an additional dialect would be more likely on the table.

@Sec-ant
Copy link

Sec-ant commented Jan 9, 2024

Yeah, it's not a big problem and you're doing a great job, thanks!

Just a small update: I made some stupid mistakes in v0.4.0~v0.4.2, if you find yourself not being able to make prettier-plugin-embed work, please try v0.4.3.

And a bit of tangent: I really like the online playground you provide in the repo, I wonder if that is open sourced somewhere? Can you point me in the right direction? Oh, never mind, I just found it: https://github.com/nene/prettier-sql-playground

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

No branches or pull requests

2 participants