fix(gendoc): accept .slnx solutions in the documentation generator#15
Merged
Merged
Conversation
GetErrorDocumentationFrom validated the extension against ".sln" only and threw ArgumentException otherwise, contradicting ReadSolutionProjects (which enumerates projects via "dotnet sln list" and handles .sln and .slnx uniformly). Valid .slnx solutions were therefore rejected before reaching the enumeration step. Accept both .sln and .slnx. Solution filters (.slnf) stay excluded: the "dotnet sln" subcommand does not process them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MshxEQnwdvTu8tkZPtt6PM
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.
Contexte
SolutionErrorDocumentationGenerator.GetErrorDocumentationFromvalidait l'extension du fichier de solution uniquement contre.slnet levait uneArgumentExceptionsinon. OrReadSolutionProjectsénumère les projets viadotnet sln list, qui gère.slnet.slnxuniformément — comme l'affirme d'ailleurs son propre commentaire (« handles both.slnand.slnxuniformly »).Conséquence : une solution
.slnxvalide (le nouveau format XML de Visual Studio) était rejetée avant même d'atteindre l'étape d'énumération, rendant ce format inutilisable. Contradiction interne du code.Changement
.slnet.slnx; le message d'erreur est mis à jour en conséquence..slnf) restent volontairement exclus : la sous-commandedotnet slnne les traite pas (ils sont consommés pardotnet build/test/run), les accepter ferait échouerReadSolutionProjectsplus loin avec un message moins clair.Tests
Ajout d'un
[Theory]GetErrorDocumentationFromAcceptsSolutionFormatscouvrant.slnet.slnx: il vérifie que les deux extensions franchissent la validation (aucuneArgumentExceptionn'est levée pour l'extension). Le test existant qui rejette une extension inattendue reste valide.🤖 Generated with Claude Code