DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Open source Microsoft.SqlServer.TransactSql.ScriptDom

Open clement911 opened this issue 5 years ago • 13 comments

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?

clement911 avatar Jun 10 '20 14:06 clement911

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

kburtram avatar Jun 16 '20 02:06 kburtram

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

shueybubbles avatar Jun 22 '20 20:06 shueybubbles

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 avatar Jun 22 '20 21:06 pensivebrian

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

clement911 avatar Jun 23 '20 07:06 clement911

@pensivebrian any updates?

clement911 avatar Sep 10 '21 11:09 clement911

Adding @dzsquared

pensivebrian avatar Sep 10 '21 13:09 pensivebrian

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?

clement911 avatar Mar 07 '22 07:03 clement911

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.

dadepretto avatar Mar 15 '22 22:03 dadepretto

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

clement911 avatar May 11 '22 11:05 clement911

Pretty please anyone from Microsoft could you please help 🙏?

clement911 avatar May 24 '22 11:05 clement911

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.

dzsquared avatar Jun 20 '22 15:06 dzsquared

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 avatar Jun 20 '22 23:06 clement911

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

clement911 avatar Aug 27 '22 11:08 clement911

🙏🙏🙏

clement911 avatar Nov 17 '22 21:11 clement911

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 avatar Dec 07 '22 08:12 clement911

😪

clement911 avatar Jan 10 '23 01:01 clement911

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.

ADARSOFT avatar Apr 21 '23 23:04 ADARSOFT

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

llali avatar Apr 25 '23 21:04 llali

OMG thank you!!! 💙💙💙

clement911 avatar Apr 25 '23 23:04 clement911