Skip to content
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

Making the library language/compiler agnostic #279

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Buildalyzer/AnalyzerManager.cs
Original file line number Diff line number Diff line change
@@ -39,12 +39,14 @@ public class AnalyzerManager : IAnalyzerManager

public SolutionFile SolutionFile { get; }

public List<ICompilerOptionsParser> CompilerOptionsParsers { get; }

public AnalyzerManager(AnalyzerManagerOptions options = null)
: this(null, options)
{
}

public AnalyzerManager(string solutionFilePath, AnalyzerManagerOptions options = null)
public AnalyzerManager(string solutionFilePath, AnalyzerManagerOptions? options = null)
{
options ??= new AnalyzerManagerOptions();
LoggerFactory = options.LoggerFactory;
@@ -58,13 +60,15 @@ public AnalyzerManager(string solutionFilePath, AnalyzerManagerOptions options =
foreach (ProjectInSolution projectInSolution in SolutionFile.ProjectsInOrder)
{
if (!SupportedProjectTypes.Contains(projectInSolution.ProjectType)
|| (options?.ProjectFilter != null && !options.ProjectFilter(projectInSolution)))
|| (options.ProjectFilter != null && !options.ProjectFilter(projectInSolution)))
{
continue;
}
GetProject(projectInSolution.AbsolutePath, projectInSolution);
}
}

CompilerOptionsParsers = options.CompilerOptionsParsers;
}

public void SetGlobalProperty(string key, string value)
5 changes: 5 additions & 0 deletions src/Buildalyzer/AnalyzerManagerOptions.cs
Original file line number Diff line number Diff line change
@@ -30,4 +30,9 @@ public TextWriter LogWriter
LoggerFactory.AddProvider(new TextWriterLoggerProvider(value));
}
}

public List<ICompilerOptionsParser> CompilerOptionsParsers { get; set; } = [
CscOptionsParser.Instance,
VbcOptionsParser.Instance,
FscOptionsParser.Instance];
}
22 changes: 1 addition & 21 deletions src/Buildalyzer/AnalyzerResult.cs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ public class AnalyzerResult : IAnalyzerResult
private readonly Dictionary<string, IProjectItem[]> _items = new Dictionary<string, IProjectItem[]>(StringComparer.OrdinalIgnoreCase);
private readonly Guid _projectGuid;

public CompilerCommand CompilerCommand { get; private set; }
public CompilerCommand CompilerCommand { get; internal set; }

internal AnalyzerResult(string projectFilePath, AnalyzerManager manager, ProjectAnalyzer analyzer)
{
@@ -107,26 +107,6 @@ internal void ProcessProject(PropertiesAndItems propertiesAndItems)
}
}

internal void ProcessCscCommandLine(string commandLine, bool coreCompile)
{
// Some projects can have multiple Csc calls (see #92) so if this is the one inside CoreCompile use it, otherwise use the first
if (string.IsNullOrWhiteSpace(commandLine) || (CompilerCommand != null && !coreCompile))
{
return;
}
CompilerCommand = Compiler.CommandLine.Parse(new FileInfo(ProjectFilePath).Directory, commandLine, CompilerLanguage.CSharp);
}

internal void ProcessVbcCommandLine(string commandLine)
{
CompilerCommand = Compiler.CommandLine.Parse(new FileInfo(ProjectFilePath).Directory, commandLine, CompilerLanguage.VisualBasic);
}

internal void ProcessFscCommandLine(string commandLine)
{
CompilerCommand = Compiler.CommandLine.Parse(new FileInfo(ProjectFilePath).Directory, commandLine, CompilerLanguage.FSharp);
}

private class ProjectItemItemSpecEqualityComparer : IEqualityComparer<IProjectItem>
{
public bool Equals(IProjectItem x, IProjectItem y) => x.ItemSpec.Equals(y.ItemSpec, StringComparison.OrdinalIgnoreCase);
2 changes: 1 addition & 1 deletion src/Buildalyzer/Compiler/CSharpCompilerCommand.cs
Original file line number Diff line number Diff line change
@@ -7,5 +7,5 @@ namespace Buildalyzer;
public sealed record CSharpCompilerCommand : RoslynBasedCompilerCommand<CSharpCommandLineArguments>
{
/// <inheritdoc />
public override CompilerLanguage Language => CompilerLanguage.CSharp;
public override string Language => "C#";
}
118 changes: 0 additions & 118 deletions src/Buildalyzer/Compiler/Compiler.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Buildalyzer/Compiler/CompilerCommand.cs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ namespace Buildalyzer;
public abstract record CompilerCommand
{
/// <summary>The compiler lanuague.</summary>
public abstract CompilerLanguage Language { get; }
public abstract string Language { get; }

/// <summary>The original text of the compiler command.</summary>
public string Text { get; init; } = string.Empty;
17 changes: 0 additions & 17 deletions src/Buildalyzer/Compiler/CompilerLanguage.cs

This file was deleted.

52 changes: 52 additions & 0 deletions src/Buildalyzer/Compiler/CscOptionsParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.IO;
using Buildalyzer.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;

namespace Buildalyzer;

/// <summary>
/// A parser for the csc compiler options (Roslyn).
/// </summary>
public sealed class CscOptionsParser : ICompilerOptionsParser
{
/// <summary>
/// A singleton instance of the parser.
/// </summary>
public static CscOptionsParser Instance { get; } = new CscOptionsParser();

public string Language => "C#";

private CscOptionsParser()
{
}

public bool IsSupportedInvocation(object sender, BuildMessageEventArgs eventArgs, CompilerOptionsContext context) =>
eventArgs is TaskCommandLineEventArgs cmd
&& string.Equals(cmd.TaskName, "Csc", StringComparison.OrdinalIgnoreCase);

public CompilerCommand? Parse(string commandLine, CompilerOptionsContext context)
{
if (string.IsNullOrWhiteSpace(commandLine) || (!context.IsFirstInvocation && !context.CoreCompile))
{
return null;
}

var tokens = RoslynParser.SplitCommandLineIntoArguments(commandLine, "csc.dll", "csc.exe")
?? throw new FormatException("Commandline could not be parsed.");
var location = new FileInfo(tokens[0]);
var args = tokens[1..];

var arguments = CSharpCommandLineParser.Default.Parse(args, context.BaseDirectory?.ToString(), location.Directory?.ToString());
var command = new CSharpCompilerCommand()
{
CommandLineArguments = arguments,
Text = commandLine,
CompilerLocation = location,
Arguments = args.ToImmutableArray(),
};
return RoslynParser.Enrich(command, arguments);
}
}
2 changes: 1 addition & 1 deletion src/Buildalyzer/Compiler/FSharpCompilerCommand.cs
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@ namespace Buildalyzer;
public sealed record FSharpCompilerCommand : CompilerCommand
{
/// <inheritdoc />
public override CompilerLanguage Language => CompilerLanguage.FSharp;
public override string Language => "F#";
}
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

namespace Buildalyzer;

internal static class FSharpCommandLineParser
internal static class FSharpParser
{
[Pure]
public static string[]? SplitCommandLineIntoArguments(string? commandLine)
52 changes: 52 additions & 0 deletions src/Buildalyzer/Compiler/FscOptionsParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.IO;
using Buildalyzer.IO;
using Microsoft.Build.Framework;
using Microsoft.CodeAnalysis.VisualBasic;

namespace Buildalyzer;

/// <summary>
/// A parser for the fsc compiler options (F#).
/// </summary>
public sealed class FscOptionsParser : ICompilerOptionsParser
{
/// <summary>
/// A singleton instance of the parser.
/// </summary>
public static FscOptionsParser Instance { get; } = new FscOptionsParser();

public string Language => "F#";

private FscOptionsParser()
{
}

public bool IsSupportedInvocation(object sender, BuildMessageEventArgs eventArgs, CompilerOptionsContext context) =>
eventArgs.SenderName?.Equals("Fsc", StringComparison.OrdinalIgnoreCase) == true
&& !string.IsNullOrWhiteSpace(eventArgs.Message)
&& context.TargetStack.Any(x => x.TargetName == "CoreCompile")
&& context.IsFirstInvocation;

public CompilerCommand? Parse(string commandLine, CompilerOptionsContext context)
{
var tokens = FSharpParser.SplitCommandLineIntoArguments(commandLine)
?? throw new FormatException("Commandline could not be parsed.");

var location = new FileInfo(tokens[0]);
var args = tokens[1..];

var sourceFiles = args.Where(a => a[0] != '-').Select(IOPath.Parse);
var preprocessorSymbolNames = args.Where(a => a.StartsWith("--define:")).Select(a => a[9..]);
var metadataReferences = args.Where(a => a.StartsWith("-r:")).Select(a => a[3..]);

return new FSharpCompilerCommand()
{
MetadataReferences = metadataReferences.ToImmutableArray(),
PreprocessorSymbolNames = preprocessorSymbolNames.ToImmutableArray(),
SourceFiles = sourceFiles.ToImmutableArray(),
Text = commandLine,
CompilerLocation = location,
Arguments = args.ToImmutableArray(),
};
}
}
59 changes: 59 additions & 0 deletions src/Buildalyzer/Compiler/ICompilerOptionsParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System.IO;
using Microsoft.Build.Framework;

namespace Buildalyzer;

/// <summary>
/// Parses compiler options from a string.
/// </summary>
public interface ICompilerOptionsParser
{
/// <summary>
/// The name of the language that this parser supports.
/// </summary>
public string Language { get; }

/// <summary>
/// Checks, if the given invocation is one for the language compiler that this parser supports.
/// </summary>
/// <param name="sender">The event sender.</param>
/// <param name="eventArgs">The build event arguments.</param>
/// <param name="context">Contextual information for the parser.</param>
/// <returns>True, if this parser supports the event and should be invoked.</returns>
public bool IsSupportedInvocation(object sender, BuildMessageEventArgs eventArgs, CompilerOptionsContext context);

/// <summary>
/// Parses the compiler options from the given command line.
/// </summary>
/// <param name="commandLine">The command line to parse.</param>
/// <param name="context">Contextual information for the parser.</param>
/// <returns>The parsed <see cref="CompilerCommand"/>.</returns>
CompilerCommand? Parse(string commandLine, CompilerOptionsContext context);
}

/// <summary>
/// Contextual information for parsing compiler options.
/// </summary>
public readonly struct CompilerOptionsContext
{
/// <summary>
/// True, if this is the first compiler invocation.
/// False, if one is already found.
/// </summary>
public bool IsFirstInvocation { get; init; }

/// <summary>
/// True, if this is a call inside CoreCompile.
/// </summary>
public bool CoreCompile { get; init; }

/// <summary>
/// The base directory of the project.
/// </summary>
public DirectoryInfo? BaseDirectory { get; init; }

/// <summary>
/// The target stack.
/// </summary>
public IReadOnlyCollection<TargetStartedEventArgs> TargetStack { get; init; }
}
28 changes: 0 additions & 28 deletions src/Buildalyzer/Compiler/RoslynCommandLineParser.cs

This file was deleted.

49 changes: 49 additions & 0 deletions src/Buildalyzer/Compiler/RoslynParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#nullable enable

using Buildalyzer.IO;
using Microsoft.CodeAnalysis;

namespace Buildalyzer;

internal static class RoslynParser
{
public static TCommand Enrich<TCommand>(TCommand command, CommandLineArguments arguments)
where TCommand : CompilerCommand
=> command with
{
AnalyzerReferences = arguments.AnalyzerReferences.Select(AsIOPath).ToImmutableArray(),
AnalyzerConfigPaths = arguments.AnalyzerConfigPaths.Select(IOPath.Parse).ToImmutableArray(),
MetadataReferences = arguments.MetadataReferences.Select(m => m.Reference).ToImmutableArray(),
PreprocessorSymbolNames = arguments.ParseOptions.PreprocessorSymbolNames.ToImmutableArray(),

SourceFiles = arguments.SourceFiles.Select(AsIOPath).ToImmutableArray(),
AdditionalFiles = arguments.AdditionalFiles.Select(AsIOPath).ToImmutableArray(),
EmbeddedFiles = arguments.EmbeddedFiles.Select(AsIOPath).ToImmutableArray(),
};

[Pure]
internal static IOPath AsIOPath(CommandLineAnalyzerReference file) => IOPath.Parse(file.FilePath);

[Pure]
internal static IOPath AsIOPath(CommandLineSourceFile file) => IOPath.Parse(file.Path);

[Pure]
public static string[]? SplitCommandLineIntoArguments(string? commandLine, params string[] execs)
=> Split(CommandLineParser.SplitCommandLineIntoArguments(commandLine ?? string.Empty, removeHashComments: true).ToArray(), execs);

[Pure]
private static string[]? Split(string[] args, string[] execs)
{
foreach (var exec in execs)
{
for (var i = 0; i < args.Length - 1; i++)
{
if (args[i].EndsWith(exec, StringComparison.OrdinalIgnoreCase))
{
return args[i..];
}
}
}
return null;
}
}
47 changes: 47 additions & 0 deletions src/Buildalyzer/Compiler/VbcOptionsParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Tasks;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.VisualBasic;

namespace Buildalyzer;

/// <summary>
/// A parser for the vbc compiler options (Roslyn).
/// </summary>
public sealed class VbcOptionsParser : ICompilerOptionsParser
{
/// <summary>
/// A singleton instance of the parser.
/// </summary>
public static VbcOptionsParser Instance { get; } = new VbcOptionsParser();

public string Language => "VB.NET";

private VbcOptionsParser()
{
}

public bool IsSupportedInvocation(object sender, BuildMessageEventArgs eventArgs, CompilerOptionsContext context) =>
eventArgs is TaskCommandLineEventArgs cmd
&& string.Equals(cmd.TaskName, "Vbc", StringComparison.OrdinalIgnoreCase);

public CompilerCommand? Parse(string commandLine, CompilerOptionsContext context)
{
var tokens = RoslynParser.SplitCommandLineIntoArguments(commandLine, "vbc.dll", "vbc.exe")
?? throw new FormatException("Commandline could not be parsed.");
var location = new FileInfo(tokens[0]);
var args = tokens[1..];

var arguments = VisualBasicCommandLineParser.Default.Parse(args, context.BaseDirectory?.ToString(), location.Directory?.ToString());
var command = new VisualBasicCompilerCommand()
{
CommandLineArguments = arguments,
PreprocessorSymbols = arguments.ParseOptions.PreprocessorSymbols.ToImmutableDictionary(),
Text = commandLine,
CompilerLocation = location,
Arguments = args.ToImmutableArray(),
};
return RoslynParser.Enrich(command, arguments);
}
}
2 changes: 1 addition & 1 deletion src/Buildalyzer/Compiler/VisualBasicCompilerCommand.cs
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ namespace Buildalyzer;
public sealed record VisualBasicCompilerCommand : RoslynBasedCompilerCommand<VisualBasicCommandLineArguments>
{
/// <inheritdoc />
public override CompilerLanguage Language => CompilerLanguage.VisualBasic;
public override string Language => "VB.NET";

/// <inheritdoc cref="VisualBasicParseOptions.PreprocessorSymbols" />
public ImmutableDictionary<string, object>? PreprocessorSymbols { get; init; }
14 changes: 0 additions & 14 deletions src/Buildalyzer/Extensions/CompilerLanguageExtensions.cs

This file was deleted.

35 changes: 18 additions & 17 deletions src/Buildalyzer/Logging/EventProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
extern alias StructuredLogger;

using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Extensions.Logging;

@@ -148,26 +150,25 @@ private void MessageRaised(object sender, BuildMessageEventArgs e)
AnalyzerResult result = _currentResult.Count == 0 ? null : _currentResult.Peek();
if (result is object)
{
// Process the command line arguments for the Fsc task
if (e.SenderName?.Equals("Fsc", StringComparison.OrdinalIgnoreCase) == true
&& !string.IsNullOrWhiteSpace(e.Message)
&& _targetStack.Any(x => x.TargetName == "CoreCompile")
&& result.CompilerCommand is null)
{
result.ProcessFscCommandLine(e.Message);
}

// Process the command line arguments for the Csc task
if (e is TaskCommandLineEventArgs cmd
&& string.Equals(cmd.TaskName, "Csc", StringComparison.OrdinalIgnoreCase))
CompilerOptionsContext context = new()
{
result.ProcessCscCommandLine(cmd.CommandLine, _targetStack.Any(x => x.TargetName == "CoreCompile"));
}
IsFirstInvocation = result.CompilerCommand is null,
CoreCompile = _targetStack.Any(x => x.TargetName == "CoreCompile"),
BaseDirectory = new FileInfo(result.ProjectFilePath).Directory,
TargetStack = _targetStack,
};

if (e is TaskCommandLineEventArgs cmdVbc &&
string.Equals(cmdVbc.TaskName, "Vbc", StringComparison.OrdinalIgnoreCase))
foreach (ICompilerOptionsParser parser in _manager.CompilerOptionsParsers)
{
result.ProcessVbcCommandLine(cmdVbc.CommandLine);
if (parser.IsSupportedInvocation(sender, e, context))
{
CompilerCommand? command = parser.Parse(e.Message, context);
if (command is not null)
{
result.CompilerCommand = command;
break;
}
}
}
}
}
26 changes: 19 additions & 7 deletions tests/Buildalyzer.Tests/Compiler/CompilerCommandFixture.cs
Original file line number Diff line number Diff line change
@@ -39,12 +39,16 @@ public void Parse_CS()
+ "Startup.cs "
+ "/warnaserror+:NU1605";

var command = Buildalyzer.Compiler.CommandLine.Parse(new("."), commandline, CompilerLanguage.CSharp);
var command = CscOptionsParser.Instance.Parse(commandline, new CompilerOptionsContext
{
BaseDirectory = new("."),
IsFirstInvocation = true,
});

command.Should().BeEquivalentTo(new
{
Text = commandline,
Language = CompilerLanguage.CSharp,
Language = "C#",
PreprocessorSymbolNames = new[] { "TRACE", "DEBUG", "NETCOREAPP", "NETCOREAPP3_1", "NETCOREAPP1_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "NETCOREAPP2_0_OR_GREATER", "NETCOREAPP2_1_OR_GREATER", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP3_0_OR_GREATER", "NETCOREAPP3_1_OR_GREATER" },
SourceFiles = Files(".\\Program.cs", ".\\Startup.cs"),
AnalyzerConfigPaths = Files(".\\code\\buildalyzer\\.editorconfig", ".\\code\\buildalyzer\\tests\\.editorconfig"),
@@ -67,12 +71,16 @@ public void Parse_VB()
+ "\"obj\\Debug\\net6.0\\VisualBasicNetConsoleApp.AssemblyInfo.vb\" "
+ "/warnaserror+:NU1605";

var command = Buildalyzer.Compiler.CommandLine.Parse(new("."), commandline, CompilerLanguage.VisualBasic);
var command = VbcOptionsParser.Instance.Parse(commandline, new CompilerOptionsContext
{
BaseDirectory = new("."),
IsFirstInvocation = true,
});

command.Should().BeEquivalentTo(new
{
Text = commandline,
Language = CompilerLanguage.VisualBasic,
Language = "VB.NET",
PreprocessorSymbolNames = new[] { "TRACE", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP1_0_OR_GREATER", "NET6_0", "NETCOREAPP2_0_OR_GREATER", "NETCOREAPP3_0_OR_GREATER", "_MyType", "NETCOREAPP", "NETCOREAPP2_1_OR_GREATER", "NET6_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "CONFIG", "NET", "PLATFORM", "NETCOREAPP3_1_OR_GREATER", "DEBUG", "NET5_0_OR_GREATER", "VBC_VER", "TARGET" },
SourceFiles = Files(".\\Configuration.vb", ".\\Program.vb", ".\\obj\\Debug\\net6.0\\.NETCoreApp,Version=v6.0.AssemblyAttributes.vb", ".\\obj\\Debug\\net6.0\\VisualBasicNetConsoleApp.AssemblyInfo.vb"),
AnalyzerReferences = Files("C:\\Program Files\\dotnet\\sdk\\8.0.200\\Sdks\\Microsoft.NET.Sdk\\targets\\..\\analyzers\\Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers.dll", "C:\\Program Files\\dotnet\\sdk\\8.0.200\\Sdks\\Microsoft.NET.Sdk\\targets\\..\\analyzers\\Microsoft.CodeAnalysis.NetAnalyzers.dll"),
@@ -121,13 +129,17 @@ public void Parse_FSharp()
obj\Debug\netcoreapp3.1\FSharpProject.AssemblyInfo.fs
Program.fs";

var command = Buildalyzer.Compiler.CommandLine.Parse(new("."), commandLine, CompilerLanguage.FSharp);
var command = FscOptionsParser.Instance.Parse(commandLine, new CompilerOptionsContext
{
BaseDirectory = new("."),
IsFirstInvocation = true,
});
var options = GetFSharpParsingOptions(commandLine);

command.Should().BeEquivalentTo(new
{
Text = commandLine,
Language = CompilerLanguage.FSharp,
Language = "F#",
PreprocessorSymbolNames = new[] { "NETCOREAPP3_1_OR_GREATER", "NETCOREAPP3_0_OR_GREATER", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP2_1_OR_GREATER", "NETCOREAPP2_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "NETCOREAPP1_0_OR_GREATER", "NETCOREAPP3_1", "NETCOREAPP", "DEBUG", "TRACE" },
SourceFiles = Files("obj\\Debug\\netcoreapp3.1\\.NETCoreApp,Version=v3.1.AssemblyAttributes.fs", "obj\\Debug\\netcoreapp3.1\\FSharpProject.AssemblyInfo.fs", "Program.fs"),
MetadataReferences = Array("C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\Microsoft.CSharp.dll", "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\Microsoft.VisualBasic.Core.dll", "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\Microsoft.VisualBasic.dll", "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\Microsoft.Win32.Primitives.dll", "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\mscorlib.dll", "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\3.1.0\\ref\\netcoreapp3.1\\netstandard.dll"),
@@ -141,7 +153,7 @@ public void Parse_FSharp()
static FSharpParsingOptions GetFSharpParsingOptions(string commandLine)
{
var checker = FSharpChecker.Instance;
var result = checker.GetParsingOptionsFromCommandLineArgs(ListModule.OfArray(FSharpCommandLineParser.SplitCommandLineIntoArguments(commandLine)), isInteractive: true, isEditing: false);
var result = checker.GetParsingOptionsFromCommandLineArgs(ListModule.OfArray(FSharpParser.SplitCommandLineIntoArguments(commandLine)), isInteractive: true, isEditing: false);
return result.Item1;
}
}