Skip to content

Commit

Permalink
Merge pull request #1804 from JoeRobich/update-roslyn-3.7-2
Browse files Browse the repository at this point in the history
Update Roslyn to 3.7.0-2
  • Loading branch information
JoeRobich authored May 20, 2020
2 parents 32cfc54 + 1dd7c36 commit 12cdba3
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All changes to the project will be documented in this file.
* Added support for `WarningsNotAsErrors` in csproj files ([#1681](https://github.com/OmniSharp/omnisharp-roslyn/issues/1681), PR: [#1784](https://github.com/OmniSharp/omnisharp-roslyn/pull/1784))
* Improved MSBuild scoring system ([#1783](https://github.com/OmniSharp/omnisharp-roslyn/issues/1783), PR: [#1797](https://github.com/OmniSharp/omnisharp-roslyn/pull/1797))
* Updated OmniSharp.Extensions.LanguageServer to `0.14.2` to fix synchronisation (PR: [#1791](https://github.com/OmniSharp/omnisharp-roslyn/pull/1791))
* Update to Roslyn `3.7.0-2.20269.10` (PR:[#1804](https://github.com/OmniSharp/omnisharp-roslyn/pull/1804))

## [1.35.1] - 2020-05-04
* Fixed not supported exception when trying to decompile a BCL assembly on Mono. For now we do not try to resolve implementation assembly from a ref assembly (PR: [#1767](https://github.com/OmniSharp/omnisharp-roslyn/pull/1767))
Expand Down
2 changes: 1 addition & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<MSBuildPackageVersion>16.5.0</MSBuildPackageVersion>
<NuGetPackageVersion>5.2.0</NuGetPackageVersion>
<RoslynPackageVersion>3.6.0-4.20228.5</RoslynPackageVersion>
<RoslynPackageVersion>3.7.0-2.20269.10</RoslynPackageVersion>
<XunitPackageVersion>2.4.0</XunitPackageVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/OmniSharp.Abstractions/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ internal static class Configuration
{
public static bool ZeroBasedIndices = false;

public const string RoslynVersion = "3.6.0.0";
public const string RoslynVersion = "3.7.0.0";
public const string RoslynPublicKeyToken = "31bf3856ad364e35";

public readonly static string RoslynFeatures = GetRoslynAssemblyFullName("Microsoft.CodeAnalysis.Features");
Expand Down
8 changes: 4 additions & 4 deletions src/OmniSharp.Http.Driver/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>

<dependentAssembly>
Expand All @@ -34,7 +34,7 @@
<assemblyIdentity name="Microsoft.Build.Utilities.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-99.0.0.0" newVersion="15.1.0.0"/>
</dependentAssembly>

<dependentAssembly>
<assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.31.0" newVersion="1.0.31.0"/>
Expand Down
2 changes: 1 addition & 1 deletion src/OmniSharp.Roslyn/MetadataExternalSourceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public MetadataExternalSourceService(IAssemblyLoader loader) : base(loader)
var topLevelSymbol = symbol.GetTopLevelContainingNamedType();

var temporaryDocument = metadataProject.AddDocument(fileName, string.Empty);
var service = _csharpMetadataAsSourceService.CreateInstance(temporaryDocument.Project.LanguageServices);
var service = _csharpMetadataAsSourceService.CreateInstance();
var method = _csharpMetadataAsSourceService.GetMethod(AddSourceToAsync);

var documentTask = method.Invoke<Task<Document>>(service, new object[] { temporaryDocument, await metadataProject.GetCompilationAsync(), topLevelSymbol, cancellationToken });
Expand Down
9 changes: 7 additions & 2 deletions src/OmniSharp.Shared/Utilities/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ public static object CreateInstance(this Lazy<Type> lazyType, params object[] ar
throw new ArgumentNullException(nameof(lazyType));
}

return Activator.CreateInstance(lazyType.Value, args);
return Activator.CreateInstance(
lazyType.Value,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
binder: null,
args,
culture: null);
}

public static T CreateInstance<T>(this Type type) where T : class
Expand Down Expand Up @@ -173,7 +178,7 @@ public static T InvokeStatic<T>(this Lazy<Type> lazyType, string methodName, obj
}

return method.InvokeStatic<T>(args);
}
}

public static T InvokeStatic<T>(this Lazy<MethodInfo> lazyMethodInfo, object[] args)
{
Expand Down
8 changes: 4 additions & 4 deletions src/OmniSharp.Stdio.Driver/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>

<dependentAssembly>
Expand All @@ -34,7 +34,7 @@
<assemblyIdentity name="Microsoft.Build.Utilities.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-99.0.0.0" newVersion="15.1.0.0"/>
</dependentAssembly>

<dependentAssembly>
<assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.31.0" newVersion="1.0.31.0"/>
Expand Down
4 changes: 2 additions & 2 deletions tests/OmniSharp.Roslyn.CSharp.Tests/EditorConfigFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public Foo(string som$$ething)

var getResponse = await getRequestHandler.Handle(getRequest);
Assert.NotNull(getResponse.CodeActions);
Assert.Contains(getResponse.CodeActions, f => f.Name == "Create and initialize field 'xxx_something'");
Assert.Contains(getResponse.CodeActions, f => f.Name == "Create and assign field 'xxx_something'");
}
}

Expand Down Expand Up @@ -324,7 +324,7 @@ public Foo(string something)
Line = point.Line,
Column = point.Offset,
FileName = testFile.FileName,
Identifier = "Create and initialize field 'xxx_something'",
Identifier = "Create and assign field 'xxx_something'",
WantsTextChanges = false,
WantsAllCodeActionOperations = true,
Buffer = testFile.Content.Code
Expand Down
6 changes: 3 additions & 3 deletions tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0"/>
</dependentAssembly>

<dependentAssembly>
Expand Down

0 comments on commit 12cdba3

Please sign in to comment.