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

Open source Microsoft.SqlServer.TransactSql.ScriptDom #101

Closed
clement911 opened this issue Jun 10, 2020 · 19 comments
Closed

Open source Microsoft.SqlServer.TransactSql.ScriptDom #101

clement911 opened this issue Jun 10, 2020 · 19 comments
Labels
area: scriptdom Related to SQLDOM script parsing or script generation question Further information is requested

Comments

@clement911
Copy link

Can you please please open source Microsoft.SqlServer.TransactSql.ScriptDom.dll?

The parser is useful, but there are still a lot of gaps that we'd like to contribute to.

This doesn't strike me as a sensitive library and we can already 'see it' in ILSpy or any other decompiler.

Could someone please raise it to the relevant people at Microsoft?

@kburtram
Copy link
Member

@shueybubbles is this on your list of projects to open-source at some point?

@kburtram kburtram added the question Further information is requested label Jun 16, 2020
@shueybubbles
Copy link

@pensivebrian might be a better person to ask, I think it's more of a dacfx component.

@pensivebrian
Copy link
Member

ScriptDom is on the list of components we'd like to open source. However, we don't have a timeline to make this happen given priorities and resources. For ScriptDom specifically, I haven't heard many request to have it open sourced.

@clement911 - Would you mind sharing more details on the gaps and your use cases for ScriptDom?

@clement911
Copy link
Author

@pensivebrian there is in particular a long standing bug that is causing us lots problems because the parser simply fails to parse some valid TSQL.

See microsoft/sqltoolsservice#868
If it's not going to be fixed by Microsoft, we'd love to take a look at it ourselves because we are using ScriptDom extensively in our app.

We would also like to enhance the SqlScriptGeneratorOptions with more options.

@clement911
Copy link
Author

@pensivebrian any updates?

@pensivebrian
Copy link
Member

Adding @dzsquared

@clement911
Copy link
Author

We're still desperately waiting on the open sourcing of ScriptDom.
Is it still on the list of components to open source? What's stopping progress?

@dadepretto
Copy link

dadepretto commented Mar 15, 2022

I'm joining the request of @clement911, although for a different reason.

In my case, I'd like to improve the SqlScriptGenerator side of things by allowing more customizable formatting.

Nowadays, we only have 3rd party solutions for serious T-SQL formatting (PoorMans T-SQL Formatter, Redgate SqlPrompt, JetBrains DataGrip) but they either have a poor feature set, don't work on non-Windows platforms, or lack customizations that I'd like to have.

Creating a formatter from scratch is out of scope. To my eyes, the Microsoft.SqlServer.TransactSql.ScriptDom library is just the right tool for the job, mainly because it's validated and maintained by Microsoft itself.

After that, it would be cool to somehow embed the solution in an Azure Data Studio Extension to give it a functionality it long deserved; but that's a story for another day.

Too bad, without the source code for the library, this solution is not possible.

I hope there will be updates on this topic.

Thanks!

EDIT
After posting the message, I realized I was probably in the right place for a direct contribution to the embedded formatter of VS Code itself, so I started digging into the TSqlFormatterService class.

Feel free to redirect me to other threads/resources if you think my contribution is best implemented in other ways and/or is loosely relevant to the thread's subject.

@clement911
Copy link
Author

@dzsquared is there anything we can do at all for this to be prioritised? We are desperate to contribute to this great lib so that we can build awesome sql tools.

@dzsquared dzsquared transferred this issue from microsoft/sqltoolsservice May 14, 2022
@clement911
Copy link
Author

Pretty please anyone from Microsoft could you please help 🙏?

@dzsquared
Copy link
Contributor

ScriptDom is still on the list of components to open source and is part of the DacFx project, so this is the correct location for this discussion.

@clement911
Copy link
Author

Thank you @dzsquared for your update.
To clarify, are you saying that it is on the roadmap to open source it? I understand this might not be a priority but is there a rough ETA?

@clement911
Copy link
Author

I'd like to raise my hand and offer any help that might be useful to get the script Dom library open source.

@clement911
Copy link
Author

🙏🙏🙏

@clement911
Copy link
Author

So it's been 2 and half years and no movement at all on this.
What's blocking this from moving forward?
The parser has lots of bugs and we have no way of fixing them...

@clement911
Copy link
Author

😪

@ADARSOFT
Copy link

I also join the comments of Mr. @clement911 and hope that Microsoft will initiate this open-source project, which will definitely lead to an improvement in the quality of writing tsql code for the entire community.

@llali
Copy link
Member

llali commented Apr 25, 2023

ScriptDom is now open-source https://github.com/microsoft/SqlScriptDom

@clement911
Copy link
Author

OMG thank you!!! 💙💙💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: scriptdom Related to SQLDOM script parsing or script generation question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants