Metalama icon indicating copy to clipboard operation
Metalama copied to clipboard

Bug: Metalama doesn't like it when Resharper updates namespaces

Open WhitWaldo opened this issue 7 months ago • 1 comments

I copied several files from one project to another and then used Resharper to update the namespaces of the copied files. This immediately threw an exception as follows:

Metalama Application: Metalama.DesignTime Metalama Version: 2024.2.16-rc Runtime: .NET 8.0.7 Processor Architecture: X64 OS Description: Microsoft Windows 10.0.19045 OS Architecture: X64 Exception type: System.InvalidOperationException Exception message: The old syntax tree is no longer alive. ===== Exception ===== System.InvalidOperationException: The old syntax tree is no longer alive. at Metalama.Framework.DesignTime.Pipeline.Diff.SyntaxTreeChange.get_OldSyntaxTreeVersionDangerous() at Metalama.Framework.DesignTime.Pipeline.Diff.SyntaxTreeChange.Merge(SyntaxTreeChange& newChange) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.Implementation.MergeCompilationChangesAsync(CompilationChangesHandle firstHandle, CompilationChanges second, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.Implementation.MergeReferencedProjectChangesAsync(ReferencedProjectChange first, ReferencedProjectChange second, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.Implementation.MergeCompilationChangesAsync(CompilationChangesHandle firstHandle, CompilationChanges second, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.Implementation.GetCompilationChangesAsyncCoreAsync(Compilation oldCompilation, Compilation newCompilation, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.Implementation.GetCompilationVersionCoreAsync(Compilation oldCompilation, Compilation newCompilation, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.Diff.ProjectVersionProvider.GetCompilationVersionAsync(Compilation oldCompilation, Compilation newCompilation, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.DesignTimeAspectPipeline.GetDesignTimeProjectVersionAsync(Compilation compilation, Boolean autoResumePipeline, AsyncExecutionContext executionContext, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.DesignTimeAspectPipeline.ExecuteAsync(Compilation compilation, Boolean autoResumePipeline, AsyncExecutionContext executionContext, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Pipeline.DesignTimeAspectPipeline.ExecuteAsync(Compilation compilation, Boolean autoResumePipeline, AsyncExecutionContext executionContext, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.AnalysisProcessProjectHandler.ComputeAsync(Compilation compilation, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.AnalysisProcessProjectHandler.ComputeAndPublishAsync(Compilation compilation, TestableCancellationToken cancellationToken) at Metalama.Framework.DesignTime.Utilities.TaskBag.<>c__DisplayClass4_0.<<Run>b__0>d.MoveNext()

Unfortunately, it then proceeded to remind me of this exception every couple of minutes until I restarted VS.

WhitWaldo avatar Jul 19 '24 00:07 WhitWaldo