Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Roslyn version and tooling to better match NET 5 Preview8 #1897

Merged
merged 5 commits into from
Aug 18, 2020

Conversation

JoeRobich
Copy link
Member

No description provided.

@@ -5,7 +5,7 @@
<PropertyGroup>
<MSBuildPackageVersion>16.6.0</MSBuildPackageVersion>
<NuGetPackageVersion>5.2.0</NuGetPackageVersion>
<RoslynPackageVersion>3.8.0-1.20363.1</RoslynPackageVersion>
<RoslynPackageVersion>3.8.0-2.20413.3</RoslynPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from where do you take the exact version? from https://github.com/dotnet/versions/tree/master/build-info/dotnet/roslyn? I normally go there but I wonder if there is a better place

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I did not know about dotnet/versions. That is super useful. =)

CHANGELOG.md Outdated
@@ -1,6 +1,15 @@
# Changelog
All changes to the project will be documented in this file.

## [1.36.2] - 2020-08-18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it has completion service, maybe 1.37.0?

@filipw
Copy link
Member

filipw commented Aug 18, 2020

the failure looks legit - looks like our reflection fails because something changed internally in extract interface code action

   OmniSharp.Roslyn.CSharp.Tests.CodeActionsWithOptionsFacts.Can_extract_interface [FAIL]
      System.InvalidOperationException : Sequence contains no elements
                      Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
        [info]: OmniSharp.WorkspaceInitializer
                Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
        [info]: OmniSharp.WorkspaceInitializer
                Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
        [info]: OmniSharp.WorkspaceInitializer
                Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
        [trce]: OmniSharp.Services.AssemblyLoader
                Assembly loaded: Microsoft.CodeAnalysis.Features, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
        [info]: OmniSharp.WorkspaceInitializer
                Configuration finished.
        [info]: TestUtility.TestServiceProvider
                GetService: ILoggerFactory => LoggerFactory
        [dbug]: OmniSharp.MSBuild.ProjectSystem
                Could not locate project for '/home/vsts/work/1/s/bin/Debug/OmniSharp.Roslyn.CSharp.Tests/net472/project.csproj'
        [info]: OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService
                Applying code action: Extract interface...
        [fail]: OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService
                An error occurred when running a code action: Extract interface...
        System.NullReferenceException: Object reference not set to an instance of an object
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.UseExpressionBodyIfDesired (Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax declaration, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x0000e] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.GenerateAccessorDeclaration (Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.IMethodSymbol accessor, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, System.Boolean hasBody, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x00043] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.GenerateAccessorDeclaration (Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.IMethodSymbol accessor, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x00018] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.GenerateAccessorList (Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x0002e] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.GeneratePropertyDeclaration (Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x0002a] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.GeneratePropertyOrIndexer (Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, Microsoft.CodeAnalysis.ParseOptions parseOptions) [0x00015] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.PropertyGenerator.AddPropertyTo (Microsoft.CodeAnalysis.CSharp.Syntax.TypeDeclarationSyntax destination, Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Collections.Generic.IList`1[T] availableIndices) [0x00023] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpCodeGenerationService.AddProperty[TDeclarationNode] (TDeclarationNode destination, Microsoft.CodeAnalysis.IPropertySymbol property, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Collections.Generic.IList`1[T] availableIndices) [0x000e5] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CodeGeneration.AbstractCodeGenerationService.UpdateDestination[TDeclarationNode] (System.Collections.Generic.IList`1[T] availableIndices, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, TDeclarationNode currentDestination, Microsoft.CodeAnalysis.ISymbol member, System.Threading.CancellationToken cancellationToken) [0x00064] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at Microsoft.CodeAnalysis.CodeGeneration.AbstractCodeGenerationService.AddMembersToAppropiateLocationInDestination[TDeclarationSyntax] (TDeclarationSyntax destination, System.Collections.Generic.IEnumerable`1[T] members, System.Collections.Generic.IList`1[T] availableIndices, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Threading.CancellationToken cancellationToken) [0x00019] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at Microsoft.CodeAnalysis.CodeGeneration.AbstractCodeGenerationService.AddMembers[TDeclarationNode] (TDeclarationNode destination, System.Collections.Generic.IEnumerable`1[T] members, System.Collections.Generic.IList`1[T] availableIndices, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Threading.CancellationToken cancellationToken) [0x00053] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at Microsoft.CodeAnalysis.CodeGeneration.AbstractCodeGenerationService.AddMembers[TDeclarationNode] (TDeclarationNode destination, System.Collections.Generic.IEnumerable`1[T] members, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Threading.CancellationToken cancellationToken) [0x0000c] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.NamedTypeGenerator.GenerateNamedTypeDeclaration (Microsoft.CodeAnalysis.CodeGeneration.ICodeGenerationService service, Microsoft.CodeAnalysis.INamedTypeSymbol namedType, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Threading.CancellationToken cancellationToken) [0x000fb] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpCodeGenerationService.CreateNamedTypeDeclaration (Microsoft.CodeAnalysis.INamedTypeSymbol namedType, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationDestination destination, Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationOptions options, System.Threading.CancellationToken cancellationToken) [0x00000] in <0b4b810de0eb484da1af1202e064b20e>:0 
          at Microsoft.CodeAnalysis.ExtractInterface.AbstractExtractInterfaceService.ExtractInterfaceToSameFileAsync (Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.ExtractInterface.ExtractInterfaceTypeAnalysisResult refactoringResult, Microsoft.CodeAnalysis.INamedTypeSymbol extractedInterfaceSymbol, Microsoft.CodeAnalysis.ExtractInterface.ExtractInterfaceOptionsResult extractInterfaceOptions, System.Threading.CancellationToken cancellationToken) [0x00235] in <2a820dfb35594d529c9279dfca8dfe38>:0 
          at Microsoft.CodeAnalysis.ExtractInterface.AbstractExtractInterfaceService.ExtractInterfaceFromAnalyzedTypeAsync (Microsoft.CodeAnalysis.ExtractInterface.ExtractInterfaceTypeAnalysisResult refactoringResult, Microsoft.CodeAnalysis.ExtractInterface.ExtractInterfaceOptionsResult extractInterfaceOptions, System.Threading.CancellationToken cancellationToken) [0x001fe] in <2a820dfb35594d529c9279dfca8dfe38>:0 
          at Microsoft.CodeAnalysis.ExtractInterface.ExtractInterfaceCodeAction.ComputeOperationsAsync (System.Object options, System.Threading.CancellationToken cancellationToken) [0x000ac] in <2a820dfb35594d529c9279dfca8dfe38>:0 
          at Microsoft.CodeAnalysis.CodeActions.CodeActionWithOptions.GetOperationsAsync (System.Object options, System.Threading.CancellationToken cancellationToken) [0x00098] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at Microsoft.CodeAnalysis.CodeActions.CodeActionWithOptions.GetOperationsCoreAsync (Microsoft.CodeAnalysis.Shared.Utilities.IProgressTracker progressTracker, System.Threading.CancellationToken cancellationToken) [0x00083] in <b39a4f1ac33a4fc6b7dc5ae677ccb661>:0 
          at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService.Handle (OmniSharp.Models.V2.CodeActions.RunCodeActionRequest request) [0x001ad] in <65ffd1ba481041bd910cf3979d802028>:0 
  Finished:    OmniSharp.Roslyn.CSharp.Tests

@JoeRobich
Copy link
Member Author

the failure looks legit

@filipw Indeed. It even reproduces in VS2019. Roslyn PR to fix dotnet/roslyn#46907. Unfortunately won't be able to bump the Roslyn driving the IDE.

@JoeRobich JoeRobich merged commit d00fe85 into OmniSharp:master Aug 18, 2020
@filipw
Copy link
Member

filipw commented Aug 18, 2020

very interesting! I am glad Omnisharp helped catch something Roslyn missed 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants