feat: add .slnx solution format support#110
Open
idg2 wants to merge 1 commit intosourcegraph:mainfrom
Open
Conversation
Upgrade Roslyn from 4.4.0 to 5.3.0 to enable MSBuildWorkspace.OpenSolutionAsync() to parse the XML-based .slnx format introduced in .NET 9 / VS 17.10. Changes: - Bump Microsoft.CodeAnalysis.* packages from 4.4.0 to 5.3.0 - Bump System.Configuration.ConfigurationManager from 7.0.0 to 9.0.0 - Add .slnx to auto-discovery, restore, and solution loading checks - Drop net6.0/net7.0 TFMs (Roslyn 5.x requires net8.0+; both are EOL) - Bump version to 0.2.14 - Add snapshot test using .slnx format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This looks good, I'll close my PR over here: #100 I'm not sure that the sourcegraph folks are looking at these PRs since the reshuffle, hopefully they eventually do 🤞 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for the XML-based
.slnxsolution format introduced in .NET 9 / Visual Studio 17.10.MSBuildWorkspace.OpenSolutionAsync()gained native.slnxsupport in Roslyn 5.0.0+ (dotnet/roslyn#77326).slnxto auto-discovery —FindSolutionOrProjectFilenow finds.slnxfiles alongside.sln.slnxto restore and loading — solution restore andOpenSolutionAsyncpaths treat.slnxsame as.slnnet6.0/net7.0TFMs — Roslyn 5.x requiresnet8.0+; both .NET 6 and 7 are end-of-lifesyntax-slnxtest fixture validates SCIP indexing via.slnxMotivation
The
.slnxformat is the default fordotnet new slnin .NET 10 and is increasingly adopted in modern .NET projects. Without this change,scip-dotnetcannot index codebases that use.slnx, requiring manual workarounds (passing individual.csprojfiles instead).Changes
ScipDotnet.csprojIndexCommandHandler.cs.slnxadded to auto-discovery filter + error messagesScipProjectIndexer.cs.slnxtreated as solution file for restore and loadingProgram.csScipDotnet.Tests.csprojsnapshots/input/syntax-slnx/.slnxformatTest plan
syntaxsnapshot test passes (.slnpath unchanged)syntax-slnxsnapshot test passes (.slnxauto-discovered and indexed).slnxwith 5 projects — produced 2.3MB SCIP index🤖 Generated with Claude Code