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

Non-fatal exception #45

Open
joefbsjr opened this issue Aug 26, 2022 · 3 comments
Open

Non-fatal exception #45

joefbsjr opened this issue Aug 26, 2022 · 3 comments

Comments

@joefbsjr
Copy link

joefbsjr commented Aug 26, 2022

I keep getting this exception in message buffer when scrolling/navigating in 0.5.5:

LSP :: Error from the Language Server: System.AggregateException: One or more errors occurred. (Service of type 'Microsoft.CodeAnalysis.Options.ILegacyGlobalOptionsWorkspaceService' is required to accomplish the task but is not available from the workspace.)
 ---> System.InvalidOperationException: Service of type 'Microsoft.CodeAnalysis.Options.ILegacyGlobalOptionsWorkspaceService' is required to accomplish the task but is not available from the workspace.
   at Microsoft.CodeAnalysis.Host.HostWorkspaceServices.GetRequiredService[TWorkspaceService]()
   at Microsoft.CodeAnalysis.GenerateEqualsAndGetHashCodeFromMembers.GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.CreateCodeActionWithDialogAsync(Document document, SyntaxNode typeDeclaration, INamedTypeSymbol containingType, ImmutableArray`1 members, CleanCodeGenerationOptionsProvider fallbackOptions, Boolean generateEquals, Boolean generateGetHashCode, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.GenerateEqualsAndGetHashCodeFromMembers.GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.CreateActionsAsync(Document document, SyntaxNode typeDeclaration, INamedTypeSymbol containingType, ImmutableArray`1 selectedMembers, CleanCodeGenerationOptionsProvider fallbackOptions, Boolean hasEquals, Boolean hasGetHashCode, Boolean withDialog, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.GenerateEqualsAndGetHashCodeFromMembers.GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.HandleNonSelectionAsync(CodeRefactoringContext context, CleanCodeGenerationOptionsProvider fallbackOptions)
   at Microsoft.CodeAnalysis.GenerateEqualsAndGetHashCodeFromMembers.GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.ComputeRefactoringsAsync(CodeRefactoringContext context)
   --- End of inner exception stack trace --- (Internal Error)

It doesn't crash or anything. But it is kinda distracting.

@razzmatazz
Copy link
Owner

Just noticed this myself. There is one commit where I made the exception not block other refactoring from yesterday.

But I need to fix dependency injection for Roslyn code better. This error seems to have started appearing with the update to the latest Roslyn libs.

@razzmatazz
Copy link
Owner

razzmatazz commented Sep 5, 2022

warnings should be fixed as of bbe04d1 (a new version has not been released yet)

@razzmatazz
Copy link
Owner

I have released a new version on nuget which should fix this issue:

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

No branches or pull requests

2 participants