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:
Kevin Cunnane
2017-03-20 14:23:00 -07:00
committed by GitHub
parent 8d47d5c7b3
commit 844358a19c
12 changed files with 94 additions and 83 deletions

Binary file not shown.

View File

@@ -1,49 +1,49 @@
{
"name": "Microsoft.SqlTools.JsonRpcTest.ExecuteQuery",
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.SqlTools.ServiceLayer": {
"target": "project"
},
"Newtonsoft.Json": "9.0.1",
"System.Data.Common": "4.1.0",
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
"Microsoft.SqlServer.Smo": "140.1.12",
"System.Security.SecureString": "4.0.0",
"System.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",
"System.Diagnostics.Contracts": "4.0.1",
"System.Diagnostics.TraceSource": "4.0.0",
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
"System.Diagnostics.Process": "4.1.0",
"System.Threading.Thread": "4.0.0"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
},
"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}
{
"name": "Microsoft.SqlTools.JsonRpcTest.ExecuteQuery",
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.SqlTools.ServiceLayer": {
"target": "project"
},
"Newtonsoft.Json": "9.0.1",
"System.Data.Common": "4.1.0",
"System.Data.SqlClient": "4.4.0-sqltools-24613-04",
"Microsoft.SqlServer.Smo": "14.0.17028",
"System.Security.SecureString": "4.0.0",
"System.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",
"System.Diagnostics.Contracts": "4.0.1",
"System.Diagnostics.TraceSource": "4.0.0",
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
"System.Diagnostics.Process": "4.1.0",
"System.Threading.Thread": "4.0.0"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
},
"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View File

@@ -1,21 +1,21 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.SqlServer.Smo": "140.1.12"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.SqlServer.Smo": "14.0.17028"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

View File

@@ -29,7 +29,7 @@
"System.Threading.Thread": "4.0.0",
"System.Runtime.Loader": "4.0.0",
"System.Composition": "1.0.31-beta-24326-02",
"Microsoft.Extensions.DependencyModel": "1.0.0",
"Microsoft.Extensions.DependencyModel": "1.0.0"
},
"frameworks": {
"netcoreapp1.0": {

View File

@@ -120,6 +120,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
public override void Visit(SqlDropUserStatement codeObject) { Format(codeObject); }
public override void Visit(SqlDropViewStatement 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(SqlExistsBooleanExpression 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(SqlMergeActionClause codeObject) { Format(codeObject); }
public override void Visit(SqlMergeSpecification codeObject) { Format(codeObject); }
public override void Visit(SqlMergeStatement codeObject) { Format(codeObject); }
public override void Visit(SqlModuleArgument codeObject) { Format(codeObject); }
public override void Visit(SqlMergeStatement codeObject) { Format(codeObject); }
public override void Visit(SqlModuleCalledOnNullInputOption codeObject) { Format(codeObject); }
public override void Visit(SqlModuleEncryptionOption codeObject) { Format(codeObject); }
public override void Visit(SqlModuleExecuteAsOption codeObject) { Format(codeObject); }

View File

@@ -21,18 +21,30 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
}
}
class SqlProcedureDefinitionFormatter : CommaSeparatedListFormatter
class SqlProcedureDefinitionFormatter : ASTNodeFormatterT<SqlProcedureDefinition>
{
NewLineSeparatedListFormatter NewLineSeparatedListFormatter { get; set; }
CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }
bool foundTokenWith;
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;
}
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)
{
Validate.IsNotNull(nameof(previousChild), previousChild);
@@ -60,7 +72,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
}
else
{
base.ProcessInterChildRegion(previousChild, nextChild);
CommaSeparatedListFormatter.ProcessInterChildRegion(previousChild, nextChild);
}
}

View File

@@ -20,8 +20,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
return new SqlTableDefinitionFormatter(visitor, codeObject);
}
}
[Export(typeof(ASTNodeFormatter))]
internal class SqlTableDefinitionFormatter : ASTNodeFormatterT<SqlTableDefinition>
{
private CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }

View File

@@ -19,7 +19,7 @@
"Newtonsoft.Json": "9.0.1",
"System.Data.Common": "4.1.0",
"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.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",

View File

@@ -17,7 +17,7 @@
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Data.Common": "4.1.0",
"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.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",

View File

@@ -16,7 +16,7 @@
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Data.Common": "4.1.0",
"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.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",

View File

@@ -19,7 +19,7 @@
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Data.Common": "4.1.0",
"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.Collections.Specialized": "4.0.1",
"System.ComponentModel.TypeConverter": "4.1.0",