Skip to content

Add integration test for restore of file-based programs #8470

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

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Jul 29, 2025

Depends on changes in dotnet/roslyn#79669

@RikkiGibson RikkiGibson requested a review from a team as a code owner July 29, 2025 22:41
@dibarbet

This comment was marked as resolved.

@RikkiGibson

This comment was marked as resolved.

@RikkiGibson RikkiGibson marked this pull request as draft July 30, 2025 00:56
@RikkiGibson
Copy link
Member Author

I gotta say, I am not the most thrilled about certain aspects of javascript debugging. (when the "current statement" being debugged is a whole screenful and then some..)

image

@dibarbet
Copy link
Member

dibarbet commented Aug 6, 2025

I gotta say, I am not the most thrilled about certain aspects of javascript debugging. (when the "current statement" being debugged is a whole screenful and then some..)

Depending on what you are debugging that may be expected or not. If you are debugging the extension code running in the tests, there should be source maps which let you step through the typescript. But if you're debugging VSCode itself, unfortunately thats what we have without a lot more setup.

@RikkiGibson
Copy link
Member Author

@dibarbet pointed out the integration test may be failing because the waiter needs to be explicitly enabled in this context.

The test does pass locally, but, maybe lack of the env var was causing a problem in CI. We will find out.

It looks like it would also be an option to add a command line argument to LanguageServer and call AsynchronousOperationListenerProvider.Enable(true);. But, setting the env var seems a bit easier.

@RikkiGibson
Copy link
Member Author

This is the problem

2025-08-12 19:10:05.471 [debug] [.NET Restore] /__w/1/s/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/src/scripts/app1.cs(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
2025-08-12 19:10:05.512 [debug] [.NET Restore] Failed to run restore on /__w/1/s/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/src/scripts/app1.cs
2025-08-12 19:10:05.513 [debug] [.NET Restore] Restore complete

This probably means an SDK update is needed.

@RikkiGibson
Copy link
Member Author

RikkiGibson commented Aug 12, 2025

Seeing a bunch of the following error in the net10 integration tests

2025-08-12 22:07:57.052 [error] [textDocument/diagnostic] [LSP] System.ArgumentException: Syntax tree doesn't belong to the underlying 'Compilation'. (Parameter 'tree')
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.VerifyTree(SyntaxTree tree) in /_/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs:line 208
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalysisResultAsync(SyntaxTree tree, Nullable`1 filterSpan, ImmutableArray`1 analyzers, CancellationToken cancellationToken) in /_/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs:line 507
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersPair.GetAnalysisResultAsync(SyntaxTree tree, Nullable`1 filterSpan, ImmutableArray`1 projectAnalyzers, ImmutableArray`1 hostAnalyzers, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/CompilationWithAnalyzersPair.cs:line 77
   at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzersPair compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/Extensions.cs:line 359
   at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzersPair compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, Project project, DiagnosticAnalyzerInfoCache analyzerInfoCache, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/Extensions.cs:line 334
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.AnalyzeInProcAsync(DocumentAnalysisScope documentAnalysisScope, Project project, CompilationWithAnalyzersPair compilationWithAnalyzers, RemoteHostClient client, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 89
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.<>c__DisplayClass7_0.<<AnalyzeAsync>g__AnalyzeCoreAsync|0>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 75
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.AnalyzeAsync(DocumentAnalysisScope documentAnalysisScope, Project project, CompilationWithAnalyzersPair compilationWithAnalyzers, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 60
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.GetAnalysisResultAsync(DocumentAnalysisScope analysisScope, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 158
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.GetSyntaxDiagnosticsAsync(DiagnosticAnalyzer analyzer, Boolean isCompilerAnalyzer, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 214
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.ComputeDiagnosticsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 121
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.ComputeDocumentDiagnosticsForAnalyzerCoreAsync(DiagnosticAnalyzer analyzer, DocumentAnalysisExecutor executor, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 47
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.ComputeDocumentDiagnosticsCoreAsync(DocumentAnalysisExecutor executor, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 33
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.<>c__DisplayClass23_0.<<GetDiagnosticsForSpanAsync>g__ComputeDocumentDiagnosticsAsync|3>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 250
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.<>c__DisplayClass23_0.<<GetDiagnosticsForSpanAsync>g__GetAsync|1>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 155
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.GetDiagnosticsForSpanAsync(TextDocument document, Nullable`1 range, Func`2 shouldIncludeDiagnostic, ICodeActionRequestPriorityProvider priorityProvider, DiagnosticKind diagnosticKind, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 86
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.GetDiagnosticsForSpanAsync(TextDocument document, Nullable`1 range, Func`2 shouldIncludeDiagnostic, ICodeActionRequestPriorityProvider priorityProvider, DiagnosticKind diagnosticKinds, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DiagnosticAnalyzerService.cs:line 121
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.DocumentDiagnosticSource.GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticSources/DocumentDiagnosticSource.cs:line 25
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.AbstractPullDiagnosticHandler`3.DiagnosticsPullCache.ComputeDataAsync(DiagnosticsRequestState state, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticsPullCache.cs:line 44
   at Microsoft.CodeAnalysis.LanguageServer.Handler.VersionedPullCache`3.CacheItem.UpdateCacheItemAsync(VersionedPullCache`3 cache, Nullable`1 previousPullResult, Boolean isFullyLoaded, TState state, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/PullHandlers/VersionedPullCache.CacheItem.cs:line 90
   at Microsoft.CodeAnalysis.LanguageServer.Handler.VersionedPullCache`3.GetOrComputeNewDataAsync(Dictionary`2 idToClientLastResult, ProjectOrDocumentId projectOrDocumentId, Project project, TState state, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/PullHandlers/VersionedPullCache.cs:line 79
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.AbstractPullDiagnosticHandler`3.HandleRequestAsync(TDiagnosticsParams diagnosticsParams, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs:line 159
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 191

This may be a repro of #8412. We'll see if it persists on re-run

@RikkiGibson
Copy link
Member Author

@davidwengier just curious, have you seen this particular failure in razor integration tests before? If you have no clue that's OK, just looking for shortcuts in the investigation..

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1120973&view=logs&j=67786fbe-0fe3-5f1e-5ae3-9a24a177250e&t=5a8bd1ff-b44c-51fc-fc8e-3fa426b0eddf&l=352

Setting test file filter to: /__w/1/s/test/razor/razorIntegrationTests/reference.integration.test.ts
VSCode version overriden to stable.
Found existing install in /__w/1/s/.vscode-test/vscode-linux-x64-1.103.0. Skipping download
Display: undefined
"/__w/1/s/.vscode-test/vscode-linux-x64-1.103.0/bin/code" --extensions-dir=/__w/1/s/.vscode-test/extensions,--user-data-dir=/__w/1/s/.vscode-test/user-data,--install-extension,ms-dotnettools.vscode-dotnet-runtime@2.3.4,--install-extension,ms-dotnettools.csharp,--install-extension,ms-dotnettools.csdevkit@1.16.6
Installing extensions...
Extension 'ms-dotnettools.vscode-dotnet-runtime@2.3.4' is already installed.
Extension 'ms-dotnettools.csharp' v2.87.31 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-dotnettools.csharp@1.2.3'.
Extension 'ms-dotnettools.csdevkit@1.16.6' is already installed.

workspace path = '/__w/1/s/test/razor/razorIntegrationTests/testAssets/RazorApp/.vscode/devkit_RazorApp.code-workspace'
[6130:0812/222957.883913:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[6130:0812/222958.222110:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[6130:0812/222958.222712:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[6130:0812/222958.224052:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[6130:0812/222958.224082:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[6130:0812/222958.224094:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[6130:0812/222958.224111:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[6130:0812/222958.224129:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type: 
[6163:0812/222958.347768:ERROR:components/viz/service/main/viz_main_impl.cc:184] Exiting GPU process due to errors during initialization
[6130:0812/222958.432850:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[6130:0812/222958.432921:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[6130:0812/222958.432959:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[main 2025-08-12T22:29:58.519Z] update#setState disabled
[main 2025-08-12T22:29:58.520Z] update#ctor - updates are disabled by the environment
[6130:0812/222958.521675:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
workbench#open()
Via 'product.json#extensionEnabledApiProposals' extension 'ms-vsliveshare.vsliveshare' wants API proposal 'notebookCellExecutionState' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.gather' wants API proposal 'notebookCellExecutionState' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.vscode-pylance' wants API proposal 'mcpConfigurationProvider' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Started local extension host with pid 6252.
IExtensionHostStarter.start() took 59 ms.
ChatSessionStore: Migrating 0 chat sessions from storage service to file system
Loading development extension at /__w/1/s
NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.scannedExtensions: vscode.bat,vscode.clojure,vscode.coffeescript,vscode.configuration-editing,vscode.cpp,vscode.csharp,vscode.css,vscode.css-language-features,vscode.dart,vscode.debug-auto-launch,vscode.debug-server-ready,vscode.diff,vscode.docker,vscode.emmet,vscode.extension-editing,vscode.fsharp,vscode.git,vscode.git-base,vscode.github,vscode.github-authentication,vscode.go,vscode.groovy,vscode.grunt,vscode.gulp,vscode.handlebars,vscode.hlsl,vscode.html,vscode.html-language-features,vscode.ini,vscode.ipynb,vscode.jake,vscode.java,vscode.javascript,vscode.json,vscode.json-language-features,vscode.julia,vscode.latex,vscode.less,vscode.log,vscode.lua,vscode.make,vscode.markdown,vscode.markdown-language-features,vscode.markdown-math,vscode.media-preview,vscode.merge-conflict,vscode.microsoft-authentication,ms-vscode.js-debug,ms-vscode.js-debug-companion,ms-vscode.vscode-js-profile-table,vscode.builtin-notebook-renderers,vscode.npm,vscode.objective-c,vscode.perl,vscode.php,vscode.php-language-features,vscode.powershell,vscode.prompt,vscode.pug,vscode.python,vscode.r,vscode.razor,vscode.references-view,vscode.restructuredtext,vscode.ruby,vscode.rust,vscode.scss,vscode.search-result,vscode.shaderlab,vscode.shellscript,vscode.simple-browser,vscode.sql,vscode.swift,vscode.terminal-suggest,vscode.theme-abyss,vscode.theme-defaults,vscode.theme-kimbie-dark,vscode.theme-monokai,vscode.theme-monokai-dimmed,vscode.theme-quietlight,vscode.theme-red,vscode.vscode-theme-seti,vscode.theme-solarized-dark,vscode.theme-solarized-light,vscode.theme-tomorrow-night-blue,vscode.tunnel-forwarding,vscode.typescript,vscode.typescript-language-features,vscode.vb,vscode.xml,vscode.yaml,ms-dotnettools.csdevkit,ms-dotnettools.csharp,ms-dotnettools.vscode-dotnet-runtime
NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.localExtensions: ms-dotnettools.csharp,vscode.bat,vscode.clojure,vscode.coffeescript,vscode.configuration-editing,vscode.cpp,vscode.csharp,vscode.css,vscode.css-language-features,vscode.dart,vscode.debug-auto-launch,vscode.debug-server-ready,vscode.diff,vscode.docker,vscode.emmet,vscode.extension-editing,vscode.fsharp,vscode.git,vscode.git-base,vscode.github,vscode.github-authentication,vscode.go,vscode.groovy,vscode.grunt,vscode.gulp,vscode.handlebars,vscode.hlsl,vscode.html,vscode.html-language-features,vscode.ini,vscode.ipynb,vscode.jake,vscode.java,vscode.javascript,vscode.json,vscode.json-language-features,vscode.julia,vscode.latex,vscode.less,vscode.log,vscode.lua,vscode.make,vscode.markdown,vscode.markdown-language-features,vscode.markdown-math,vscode.media-preview,vscode.merge-conflict,vscode.microsoft-authentication,ms-vscode.js-debug,ms-vscode.js-debug-companion,ms-vscode.vscode-js-profile-table,vscode.builtin-notebook-renderers,vscode.npm,vscode.objective-c,vscode.perl,vscode.php,vscode.php-language-features,vscode.powershell,vscode.prompt,vscode.pug,vscode.python,vscode.r,vscode.razor,vscode.references-view,vscode.restructuredtext,vscode.ruby,vscode.rust,vscode.scss,vscode.search-result,vscode.shaderlab,vscode.shellscript,vscode.simple-browser,vscode.sql,vscode.swift,vscode.terminal-suggest,vscode.theme-abyss,vscode.theme-defaults,vscode.theme-kimbie-dark,vscode.theme-monokai,vscode.theme-monokai-dimmed,vscode.theme-quietlight,vscode.theme-red,vscode.vscode-theme-seti,vscode.theme-solarized-dark,vscode.theme-solarized-light,vscode.theme-tomorrow-night-blue,vscode.tunnel-forwarding,vscode.typescript,vscode.typescript-language-features,vscode.vb,vscode.xml,vscode.yaml,ms-dotnettools.csdevkit,ms-dotnettools.vscode-dotnet-runtime
NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.myExtensions: ms-dotnettools.csharp,vscode.bat,vscode.clojure,vscode.coffeescript,vscode.configuration-editing,vscode.cpp,vscode.csharp,vscode.css,vscode.css-language-features,vscode.dart,vscode.debug-auto-launch,vscode.debug-server-ready,vscode.diff,vscode.docker,vscode.emmet,vscode.extension-editing,vscode.fsharp,vscode.git,vscode.git-base,vscode.github,vscode.github-authentication,vscode.go,vscode.groovy,vscode.grunt,vscode.gulp,vscode.handlebars,vscode.hlsl,vscode.html,vscode.html-language-features,vscode.ini,vscode.ipynb,vscode.jake,vscode.java,vscode.javascript,vscode.json,vscode.json-language-features,vscode.julia,vscode.latex,vscode.less,vscode.log,vscode.lua,vscode.make,vscode.markdown,vscode.markdown-language-features,vscode.markdown-math,vscode.media-preview,vscode.merge-conflict,vscode.microsoft-authentication,ms-vscode.js-debug,ms-vscode.js-debug-companion,ms-vscode.vscode-js-profile-table,vscode.builtin-notebook-renderers,vscode.npm,vscode.objective-c,vscode.perl,vscode.php,vscode.php-language-features,vscode.powershell,vscode.prompt,vscode.pug,vscode.python,vscode.r,vscode.razor,vscode.references-view,vscode.restructuredtext,vscode.ruby,vscode.rust,vscode.scss,vscode.search-result,vscode.shaderlab,vscode.shellscript,vscode.simple-browser,vscode.sql,vscode.swift,vscode.terminal-suggest,vscode.theme-abyss,vscode.theme-defaults,vscode.theme-kimbie-dark,vscode.theme-monokai,vscode.theme-monokai-dimmed,vscode.theme-quietlight,vscode.theme-red,vscode.vscode-theme-seti,vscode.theme-solarized-dark,vscode.theme-solarized-light,vscode.theme-tomorrow-night-blue,vscode.tunnel-forwarding,vscode.typescript,vscode.typescript-language-features,vscode.vb,vscode.xml,vscode.yaml,ms-dotnettools.csdevkit,ms-dotnettools.vscode-dotnet-runtime
Settings Sync: Account status changed from uninitialized to unavailable
(node:6252) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `exe --trace-deprecation ...` to show where the warning was created)
Auto updating outdated extensions. ms-dotnettools.csdevkit, ms-dotnettools.vscode-dotnet-runtime
Running one project: Razor Integration Tests
  console.log
    ms-dotnettools.csharp activated

      at Object.activateCSharpExtension (../../lsptoolshost/integrationTests/integrationHelpers.ts:51:13)

Tests:       1 failed, 3 passed, 4 total
Snapshots:   0 total
Time:        19.354 s
Ran all test suites.

All that "failed to connect to the bus" stuff looks particularly suspicious to me

@dibarbet
Copy link
Member

[6130:0812/222958.432959:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

this is relatively normal and generally not indicative of the failure cause. most of the times I'd recommend looking at the actual c#/razor logs in the attached artifacts. the vscode process output is only occasionally useful

@RikkiGibson
Copy link
Member Author

Seeing a bunch of the following error in the net10 integration tests

2025-08-12 22:07:57.052 [error] [textDocument/diagnostic] [LSP] System.ArgumentException: Syntax tree doesn't belong to the underlying 'Compilation'. (Parameter 'tree')
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.VerifyTree(SyntaxTree tree) in /_/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs:line 208
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalysisResultAsync(SyntaxTree tree, Nullable`1 filterSpan, ImmutableArray`1 analyzers, CancellationToken cancellationToken) in /_/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs:line 507
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersPair.GetAnalysisResultAsync(SyntaxTree tree, Nullable`1 filterSpan, ImmutableArray`1 projectAnalyzers, ImmutableArray`1 hostAnalyzers, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/CompilationWithAnalyzersPair.cs:line 77
   at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzersPair compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/Extensions.cs:line 359
   at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzersPair compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, Project project, DiagnosticAnalyzerInfoCache analyzerInfoCache, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Diagnostics/Extensions.cs:line 334
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.AnalyzeInProcAsync(DocumentAnalysisScope documentAnalysisScope, Project project, CompilationWithAnalyzersPair compilationWithAnalyzers, RemoteHostClient client, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 89
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.<>c__DisplayClass7_0.<<AnalyzeAsync>g__AnalyzeCoreAsync|0>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 75
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.AnalyzeAsync(DocumentAnalysisScope documentAnalysisScope, Project project, CompilationWithAnalyzersPair compilationWithAnalyzers, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/InProcOrRemoteHostAnalyzerRunner.cs:line 60
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.GetAnalysisResultAsync(DocumentAnalysisScope analysisScope, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 158
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.GetSyntaxDiagnosticsAsync(DiagnosticAnalyzer analyzer, Boolean isCompilerAnalyzer, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 214
   at Microsoft.CodeAnalysis.Diagnostics.DocumentAnalysisExecutor.ComputeDiagnosticsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DocumentAnalysisExecutor.cs:line 121
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.ComputeDocumentDiagnosticsForAnalyzerCoreAsync(DiagnosticAnalyzer analyzer, DocumentAnalysisExecutor executor, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 47
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.ComputeDocumentDiagnosticsCoreAsync(DocumentAnalysisExecutor executor, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 33
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.<>c__DisplayClass23_0.<<GetDiagnosticsForSpanAsync>g__ComputeDocumentDiagnosticsAsync|3>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 250
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.<>c__DisplayClass23_0.<<GetDiagnosticsForSpanAsync>g__GetAsync|1>d.MoveNext() in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 155
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.DiagnosticIncrementalAnalyzer.GetDiagnosticsForSpanAsync(TextDocument document, Nullable`1 range, Func`2 shouldIncludeDiagnostic, ICodeActionRequestPriorityProvider priorityProvider, DiagnosticKind diagnosticKind, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/EngineV2/DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs:line 86
   at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.GetDiagnosticsForSpanAsync(TextDocument document, Nullable`1 range, Func`2 shouldIncludeDiagnostic, ICodeActionRequestPriorityProvider priorityProvider, DiagnosticKind diagnosticKinds, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/Diagnostics/Service/DiagnosticAnalyzerService.cs:line 121
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.DocumentDiagnosticSource.GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticSources/DocumentDiagnosticSource.cs:line 25
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.AbstractPullDiagnosticHandler`3.DiagnosticsPullCache.ComputeDataAsync(DiagnosticsRequestState state, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticsPullCache.cs:line 44
   at Microsoft.CodeAnalysis.LanguageServer.Handler.VersionedPullCache`3.CacheItem.UpdateCacheItemAsync(VersionedPullCache`3 cache, Nullable`1 previousPullResult, Boolean isFullyLoaded, TState state, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/PullHandlers/VersionedPullCache.CacheItem.cs:line 90
   at Microsoft.CodeAnalysis.LanguageServer.Handler.VersionedPullCache`3.GetOrComputeNewDataAsync(Dictionary`2 idToClientLastResult, ProjectOrDocumentId projectOrDocumentId, Project project, TState state, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/PullHandlers/VersionedPullCache.cs:line 79
   at Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.AbstractPullDiagnosticHandler`3.HandleRequestAsync(TDiagnosticsParams diagnosticsParams, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs:line 159
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 191

This may be a repro of #8412. We'll see if it persists on re-run

I'm continuing to see this as well as quite a few failing integration tests on re-run. Maybe we really are getting a Free Reproducer Of The Issue for our trouble. I won't be able to investigate in detail today, but, hopefully tomorrow.

@davidwengier
Copy link
Member

davidwengier commented Aug 12, 2025

I haven't seen that error before today, but the same thing has just been reported on another Razor VS Code issue: microsoft/vscode-dotnettools#2229

I am planning to investigate that today, as this could be a cohosting issue unrelated to file-based programs (we do various crimes with generated document trees) though the fact that the exception originates from the CLaSP queue, and your test isn't modifying a Razor document, it seems relatively unlikely.

EDIT: I just re-read where you tagged me, and to be clear, in this comment I'm talking about the "Syntax tree doesn't belong to the underlying 'Compilation'." exception, not the failing Razor tests you linked to. Sorry, too early for proper comprehension :)

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.

3 participants