From f9bf307a02ee88633aff0468fb9968670ce9a852 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Fri, 20 Sep 2024 18:32:04 +1000 Subject: [PATCH] Document where exported function is imported Unlike exports of interfaces, it's harder to find the consumer of an exported function. This change adds a comment showing where to find this import. Also some minor formatting. --- .../FSharp/FSharpCommandLineParserService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/FSharp/FSharpCommandLineParserService.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/FSharp/FSharpCommandLineParserService.cs index fe2424f3a48..9ceefb009fc 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/FSharp/FSharpCommandLineParserService.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/FSharp/FSharpCommandLineParserService.cs @@ -73,17 +73,19 @@ public BuildOptions Parse(IEnumerable arguments, string baseDirectory) } return new FSharpBuildOptions( - sourceFiles: sourceFiles.ToImmutableArray(), - additionalFiles: ImmutableArray.Empty, - metadataReferences: metadataReferences.ToImmutableArray(), - analyzerReferences: ImmutableArray.Empty, - compileOptions: commandLineOptions.ToImmutableArray()); + sourceFiles: sourceFiles.ToImmutableArray(), + additionalFiles: [], + metadataReferences: metadataReferences.ToImmutableArray(), + analyzerReferences: [], + compileOptions: commandLineOptions.ToImmutableArray()); } [Export] [AppliesTo(ProjectCapability.FSharp)] public void HandleCommandLineNotifications(string binPath, BuildOptions added, BuildOptions removed) { + // NOTE this method is imported in CommandLineNotificationHandler as an Action + if (added is FSharpBuildOptions fscAdded) { foreach (Action, ImmutableArray, ImmutableArray> handler in _handlers)