mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Bump SMO to SSMS 17.0 RC3 bits (#284)
* Bump SMO bits to align with 17.0 RC3 release * Add updated SMO binary * Fix formatter failures caused by SqlProc breaking changes - Changes to SqlProcedureDefinition subclasses mean that the definition starts at "Create Procedure" instead of after it. This highlighted an issue where the prefix region handling was via comma separated list (which adds newlines to the prefix region) instead of newline separated list (which does not). - Changed the structure to use the 2 different formatters for relevant regions, and verified all tests now pass. - Also removed unnnecessary Export clause from the SqlTableDefinitionFormatter, since this was spotted during debugging * Fix sample project.json dependencies - Fix up the dependencies in our samples as this was failing the build on TravisCI. Should consider in the future whether or not we want to exclude these from CI runs, but for now the benefit is that we're forced to keep the samples up to date.
This commit is contained in:
BIN
bin/nuget/Microsoft.SqlServer.Smo.14.0.17028.nupkg
Normal file
BIN
bin/nuget/Microsoft.SqlServer.Smo.14.0.17028.nupkg
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,49 +1,49 @@
|
|||||||
{
|
{
|
||||||
"name": "Microsoft.SqlTools.JsonRpcTest.ExecuteQuery",
|
"name": "Microsoft.SqlTools.JsonRpcTest.ExecuteQuery",
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"debugType": "portable",
|
"debugType": "portable",
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.SqlTools.ServiceLayer": {
|
"Microsoft.SqlTools.ServiceLayer": {
|
||||||
"target": "project"
|
"target": "project"
|
||||||
},
|
},
|
||||||
"Newtonsoft.Json": "9.0.1",
|
"Newtonsoft.Json": "9.0.1",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12",
|
"Microsoft.SqlServer.Smo": "14.0.17028",
|
||||||
"System.Security.SecureString": "4.0.0",
|
"System.Security.SecureString": "4.0.0",
|
||||||
"System.Collections.Specialized": "4.0.1",
|
"System.Collections.Specialized": "4.0.1",
|
||||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||||
"System.Diagnostics.Contracts": "4.0.1",
|
"System.Diagnostics.Contracts": "4.0.1",
|
||||||
"System.Diagnostics.TraceSource": "4.0.0",
|
"System.Diagnostics.TraceSource": "4.0.0",
|
||||||
"NETStandard.Library": "1.6.0",
|
"NETStandard.Library": "1.6.0",
|
||||||
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
|
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
|
||||||
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
|
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
|
||||||
"System.Diagnostics.Process": "4.1.0",
|
"System.Diagnostics.Process": "4.1.0",
|
||||||
"System.Threading.Thread": "4.0.0"
|
"System.Threading.Thread": "4.0.0"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netcoreapp1.0": {
|
"netcoreapp1.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"imports": "dnxcore50"
|
"imports": "dnxcore50"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"win7-x64": {},
|
"win7-x64": {},
|
||||||
"win7-x86": {},
|
"win7-x86": {},
|
||||||
"osx.10.11-x64": {},
|
"osx.10.11-x64": {},
|
||||||
"ubuntu.14.04-x64": {},
|
"ubuntu.14.04-x64": {},
|
||||||
"ubuntu.16.04-x64": {},
|
"ubuntu.16.04-x64": {},
|
||||||
"centos.7-x64": {},
|
"centos.7-x64": {},
|
||||||
"rhel.7.2-x64": {},
|
"rhel.7.2-x64": {},
|
||||||
"debian.8-x64": {},
|
"debian.8-x64": {},
|
||||||
"fedora.23-x64": {},
|
"fedora.23-x64": {},
|
||||||
"opensuse.13.2-x64": {}
|
"opensuse.13.2-x64": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"debugType": "portable",
|
"debugType": "portable",
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12"
|
"Microsoft.SqlServer.Smo": "14.0.17028"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netcoreapp1.0": {
|
"netcoreapp1.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
"type": "platform",
|
"type": "platform",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"imports": "dnxcore50"
|
"imports": "dnxcore50"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"System.Threading.Thread": "4.0.0",
|
"System.Threading.Thread": "4.0.0",
|
||||||
"System.Runtime.Loader": "4.0.0",
|
"System.Runtime.Loader": "4.0.0",
|
||||||
"System.Composition": "1.0.31-beta-24326-02",
|
"System.Composition": "1.0.31-beta-24326-02",
|
||||||
"Microsoft.Extensions.DependencyModel": "1.0.0",
|
"Microsoft.Extensions.DependencyModel": "1.0.0"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netcoreapp1.0": {
|
"netcoreapp1.0": {
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
|||||||
public override void Visit(SqlDropUserStatement codeObject) { Format(codeObject); }
|
public override void Visit(SqlDropUserStatement codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlDropViewStatement codeObject) { Format(codeObject); }
|
public override void Visit(SqlDropViewStatement codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlExecuteAsClause codeObject) { Format(codeObject); }
|
public override void Visit(SqlExecuteAsClause codeObject) { Format(codeObject); }
|
||||||
|
public override void Visit(SqlExecuteArgument codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlExecuteModuleStatement codeObject) { Format(codeObject); }
|
public override void Visit(SqlExecuteModuleStatement codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlExistsBooleanExpression codeObject) { Format(codeObject); }
|
public override void Visit(SqlExistsBooleanExpression codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlFillFactorIndexOption codeObject) { Format(codeObject); }
|
public override void Visit(SqlFillFactorIndexOption codeObject) { Format(codeObject); }
|
||||||
@@ -171,8 +172,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
|||||||
public override void Visit(SqlMaxDegreeOfParallelismIndexOption codeObject) { Format(codeObject); }
|
public override void Visit(SqlMaxDegreeOfParallelismIndexOption codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlMergeActionClause codeObject) { Format(codeObject); }
|
public override void Visit(SqlMergeActionClause codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlMergeSpecification codeObject) { Format(codeObject); }
|
public override void Visit(SqlMergeSpecification codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlMergeStatement codeObject) { Format(codeObject); }
|
public override void Visit(SqlMergeStatement codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlModuleArgument codeObject) { Format(codeObject); }
|
|
||||||
public override void Visit(SqlModuleCalledOnNullInputOption codeObject) { Format(codeObject); }
|
public override void Visit(SqlModuleCalledOnNullInputOption codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlModuleEncryptionOption codeObject) { Format(codeObject); }
|
public override void Visit(SqlModuleEncryptionOption codeObject) { Format(codeObject); }
|
||||||
public override void Visit(SqlModuleExecuteAsOption codeObject) { Format(codeObject); }
|
public override void Visit(SqlModuleExecuteAsOption codeObject) { Format(codeObject); }
|
||||||
|
|||||||
@@ -21,18 +21,30 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SqlProcedureDefinitionFormatter : CommaSeparatedListFormatter
|
class SqlProcedureDefinitionFormatter : ASTNodeFormatterT<SqlProcedureDefinition>
|
||||||
{
|
{
|
||||||
NewLineSeparatedListFormatter NewLineSeparatedListFormatter { get; set; }
|
NewLineSeparatedListFormatter NewLineSeparatedListFormatter { get; set; }
|
||||||
|
CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }
|
||||||
bool foundTokenWith;
|
bool foundTokenWith;
|
||||||
|
|
||||||
internal SqlProcedureDefinitionFormatter(FormatterVisitor visitor, SqlProcedureDefinition codeObject)
|
internal SqlProcedureDefinitionFormatter(FormatterVisitor visitor, SqlProcedureDefinition codeObject)
|
||||||
: base(visitor, codeObject, true)
|
: base(visitor, codeObject)
|
||||||
{
|
{
|
||||||
NewLineSeparatedListFormatter = new NewLineSeparatedListFormatter(visitor, codeObject, false);
|
NewLineSeparatedListFormatter = new NewLineSeparatedListFormatter(visitor, codeObject, true);
|
||||||
|
CommaSeparatedListFormatter = new CommaSeparatedListFormatter(visitor, codeObject, true);
|
||||||
foundTokenWith = false;
|
foundTokenWith = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void ProcessPrefixRegion(int startTokenNumber, int firstChildStartTokenNumber)
|
||||||
|
{
|
||||||
|
NewLineSeparatedListFormatter.ProcessPrefixRegion(startTokenNumber, firstChildStartTokenNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void ProcessChild(SqlCodeObject child)
|
||||||
|
{
|
||||||
|
CommaSeparatedListFormatter.ProcessChild(child);
|
||||||
|
}
|
||||||
|
|
||||||
internal override void ProcessInterChildRegion(SqlCodeObject previousChild, SqlCodeObject nextChild)
|
internal override void ProcessInterChildRegion(SqlCodeObject previousChild, SqlCodeObject nextChild)
|
||||||
{
|
{
|
||||||
Validate.IsNotNull(nameof(previousChild), previousChild);
|
Validate.IsNotNull(nameof(previousChild), previousChild);
|
||||||
@@ -60,7 +72,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
base.ProcessInterChildRegion(previousChild, nextChild);
|
CommaSeparatedListFormatter.ProcessInterChildRegion(previousChild, nextChild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
|||||||
return new SqlTableDefinitionFormatter(visitor, codeObject);
|
return new SqlTableDefinitionFormatter(visitor, codeObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Export(typeof(ASTNodeFormatter))]
|
|
||||||
internal class SqlTableDefinitionFormatter : ASTNodeFormatterT<SqlTableDefinition>
|
internal class SqlTableDefinitionFormatter : ASTNodeFormatterT<SqlTableDefinition>
|
||||||
{
|
{
|
||||||
private CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }
|
private CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"Newtonsoft.Json": "9.0.1",
|
"Newtonsoft.Json": "9.0.1",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12",
|
"Microsoft.SqlServer.Smo": "14.0.17028",
|
||||||
"System.Security.SecureString": "4.0.0",
|
"System.Security.SecureString": "4.0.0",
|
||||||
"System.Collections.Specialized": "4.0.1",
|
"System.Collections.Specialized": "4.0.1",
|
||||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12",
|
"Microsoft.SqlServer.Smo": "14.0.17028",
|
||||||
"System.Security.SecureString": "4.0.0",
|
"System.Security.SecureString": "4.0.0",
|
||||||
"System.Collections.Specialized": "4.0.1",
|
"System.Collections.Specialized": "4.0.1",
|
||||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12",
|
"Microsoft.SqlServer.Smo": "14.0.17028",
|
||||||
"System.Security.SecureString": "4.0.0",
|
"System.Security.SecureString": "4.0.0",
|
||||||
"System.Collections.Specialized": "4.0.1",
|
"System.Collections.Specialized": "4.0.1",
|
||||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
|
||||||
"Microsoft.SqlServer.Smo": "140.1.12",
|
"Microsoft.SqlServer.Smo": "14.0.17028",
|
||||||
"System.Security.SecureString": "4.0.0",
|
"System.Security.SecureString": "4.0.0",
|
||||||
"System.Collections.Specialized": "4.0.1",
|
"System.Collections.Specialized": "4.0.1",
|
||||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user