DacFx
DacFx copied to clipboard
Open source Microsoft.SqlServer.TransactSql.ScriptDom
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?
@shueybubbles is this on your list of projects to open-source at some point?
@pensivebrian might be a better person to ask, I think it's more of a dacfx component.
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?
@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 https://github.com/microsoft/sqltoolsservice/issues/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.
@pensivebrian any updates?
Adding @dzsquared
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?
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.
@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.
Pretty please anyone from Microsoft could you please help 🙏?
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.
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?
I'd like to raise my hand and offer any help that might be useful to get the script Dom library open source.
🙏🙏🙏
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...
😪
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.
ScriptDom is now open-source https://github.com/microsoft/SqlScriptDom
OMG thank you!!! 💙💙💙