microsoft / vscode-mssql

Visual Studio Code SQL Server extension.
Other
1.53k stars 457 forks source link

languages and languages contrib point already defined by built-in SQL extension #1061

Open aeschli opened 6 years ago

aeschli commented 6 years ago

VSCode ships with a built-in SQL extension that already defines the languages and grammar contribution point. The grammar used is imported from https://github.com/Microsoft/vscode-mssql/tree/master/syntaxes

I'd suggest to remove the languages and grammar contribution points from vscode-mssql.

We're happy to update the grammar anytime on request and also to change the language configuration to your liking.

kevcunnane commented 6 years ago

Can you give us more information on the impact of us also defining this? We originally did this in order to improve support for T-SQL specific syntax vs. the built-in SQL grammar file. Now that you're using ours instead of the built-in one do we get conflicts from having 2 syntaxes defined, or does one "win" over the other?

It would be good to understand how we should plan on aligning this - I know @corivera has been making updates & fixes in SQL Operations Studio to our grammar file. Should we be upstreaming these to the SQL extension in VSCode and then pulling them in from there instead? That way we would get things working a) in VSCode with / without our extension, and b) inside Ops Studio with a single commit.

aeschli commented 6 years ago

In VSCode, grammars from user-installed extensions win against grammars from built-in extensions. You can use this if you want to publish a fix quicker that we do. But other than that case it would be better if you don't define and bundle the grammar with your extension. You would still host the grammar in your github repo or, even better, in a separate repo just for the grammar. See Microsoft/TypeScript-TmLanguage as an example. We (VSCode) just regularly copy from there and will forward all issues. A benefit of that setup is that it enables other products to also consume your grammar and motivate contributors to join your efforts.

I'm not familiar with what there is in Ops Studio. Does it also contain the base SQL extension (vscode.sql)?

kevcunnane commented 6 years ago

Thanks for clarifying. I'll discuss with the team and see which of these options we want to align on.