Skip to content

Conversation

…d 0.14.6 respectively; refactor commands to accommodate new project options in analyzer functions.
@TheAngryByrd TheAngryByrd changed the title Update FSharp.Analyzers.SDK and Ionide.Analyzers to version 0.32.0 Update FSharp.Analyzers.SDK to 0.32.0 and Ionide.Analyzers to 0.14.6 Jul 12, 2025
@TheAngryByrd TheAngryByrd requested a review from Copilot July 12, 2025 16:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the FSharp.Analyzers.SDK and Ionide.Analyzers to newer versions and adjusts the code to pass project options through the analyzer invocation pipeline.

  • Bump SDK and analyzer package versions in dependencies and tool manifest
  • Change runAnalyzers and fileChecked event to accept and propagate CompilerProjectOption
  • Extend the editor context in Commands to include new ProjectOptions

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
src/FsAutoComplete/LspServers/AdaptiveServerState.fs Update fileChecked event signature and runAnalyzers to include CompilerProjectOption and derive AnalyzerProjectOptions
src/FsAutoComplete.Core/Commands.fs Add projectOptions to analyzer context creation
paket.dependencies Bump Ionide.Analyzers to 0.14.6 and FSharp.Analyzers.SDK to 0.32.0
.config/dotnet-tools.json Update fsharp-analyzers tool to version 0.32.0
Comments suppressed due to low confidence (4)

src/FsAutoComplete/LspServers/AdaptiveServerState.fs:526

  • No tests have been updated to cover the new runAnalyzers overload that accepts CompilerProjectOption. Consider adding unit tests to verify that both BackgroundCompilerOptions and TransparentCompilerOptions paths produce correct AnalyzerProjectOptions and invoke analyzers as expected.
  let runAnalyzers

src/FsAutoComplete/LspServers/AdaptiveServerState.fs:545

  • Add an XML or inline comment explaining the purpose of analyzerOptions and how it maps from CompilerProjectOption to AnalyzerProjectOptions to help future maintainers understand this transformation.
          let analyzerOptions =

src/FsAutoComplete/LspServers/AdaptiveServerState.fs:583

  • [nitpick] The fileChecked event now starts with projectOptions before the parse results, which differs from the ordering in fileParsed. Consider aligning parameter order or documenting the tuple fields clearly to maintain consistency and reduce confusion.
    <| fileChecked.Publish.Subscribe(fun (projectOptions, parseAndCheck, volatileFile, ct) ->

src/FsAutoComplete.Core/Commands.fs:1162

  • [nitpick] Consider validating or handling the projectOptions value before storing it in the editor context to ensure downstream analyzers always receive a valid configuration object.
        ProjectOptions = projectOptions }

@TheAngryByrd TheAngryByrd merged commit d38bee2 into ionide:main Jul 12, 2025
14 checks passed
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.

1 participant