question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Analysis server not sending requests when `onlyAnalyzeProjectsWithOpenFiles` is enabled

See original GitHub issue

Hey!

Describe the bug

I’ve recently been working in a monorepo, and have noticed that enabling onlyAnalyzeProjectsWithOpenFiles drastically improves performance using Neovim. On VSCode, textDocument/publishDiagnostics is called for packages adjacent to the currently opened one, resulting in duplicate code actions, auto-completion items etc.

On enabling onlyAnalyzeProjectsWithOpenFiles in the analyzer LSP, I don’t get any textDocument/publishDiagnostics or textDocument/didOpen etc as expected; despite the analyzer being initialized.

Any advice on how to resolve this is appreciated - I’m happy to continue developing on my fork and will push when fixed.

To Reproduce Steps to reproduce the behavior:

  1. Set onlyAnalyzeProjectsWithOpenFiles to true in initializationOptions
  2. Open a Dart project

Expected behavior LSP should send requests for project folders of open files in VSC.

Logs

Here’s my instrumentation log:

1635396407949:Req:{"jsonrpc"::"2.0","id"::0,"method"::"initialize","params"::{"processId"::6416,"clientInfo"::{"name"::"Visual Studio Code","version"::"1.61.2"},"locale"::"en-gb","rootPath"::"/Users/rjm/Coding/Tutero/app","rootUri"::"file::///Users/rjm/Coding/Tutero/app","capabilities"::{"workspace"::{"applyEdit"::true,"workspaceEdit"::{"documentChanges"::true,"resourceOperations"::["create","rename","delete"],"failureHandling"::"textOnlyTransactional","normalizesLineEndings"::true,"changeAnnotationSupport"::{"groupsOnLabel"::true}},"didChangeConfiguration"::{"dynamicRegistration"::true},"didChangeWatchedFiles"::{"dynamicRegistration"::true},"symbol"::{"dynamicRegistration"::true,"symbolKind"::{"valueSet"::[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport"::{"valueSet"::[1]}},"codeLens"::{"refreshSupport"::true},"executeCommand"::{"dynamicRegistration"::true},"configuration"::true,"workspaceFolders"::true,"semanticTokens"::{"refreshSupport"::true},"fileOperations"::{"dynamicRegistration"::true,"didCreate"::true,"didRename"::true,"didDelete"::true,"willCreate"::true,"willRename"::true,"willDelete"::true}},"textDocument"::{"publishDiagnostics"::{"relatedInformation"::true,"versionSupport"::false,"tagSupport"::{"valueSet"::[1,2]},"codeDescriptionSupport"::true,"dataSupport"::true},"synchronization"::{"dynamicRegistration"::true,"willSave"::true,"willSaveWaitUntil"::true,"didSave"::true},"completion"::{"dynamicRegistration"::true,"contextSupport"::true,"completionItem"::{"snippetSupport"::true,"commitCharactersSupport"::true,"documentationFormat"::["markdown","plaintext"],"deprecatedSupport"::true,"preselectSupport"::true,"tagSupport"::{"valueSet"::[1]},"insertReplaceSupport"::true,"resolveSupport"::{"properties"::["documentation","detail","additionalTextEdits"]},"insertTextModeSupport"::{"valueSet"::[1,2]}},"completionItemKind"::{"valueSet"::[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover"::{"dynamicRegistration"::true,"contentFormat"::["markdown","plaintext"]},"signatureHelp"::{"dynamicRegistration"::true,"signatureInformation"::{"documentationFormat"::["markdown","plaintext"],"parameterInformation"::{"labelOffsetSupport"::true},"activeParameterSupport"::true},"contextSupport"::true},"definition"::{"dynamicRegistration"::true,"linkSupport"::true},"references"::{"dynamicRegistration"::true},"documentHighlight"::{"dynamicRegistration"::true},"documentSymbol"::{"dynamicRegistration"::true,"symbolKind"::{"valueSet"::[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport"::true,"tagSupport"::{"valueSet"::[1]},"labelSupport"::true},"codeAction"::{"dynamicRegistration"::true,"isPreferredSupport"::true,"disabledSupport"::true,"dataSupport"::true,"resolveSupport"::{"properties"::["edit"]},"codeActionLiteralSupport"::{"codeActionKind"::{"valueSet"::["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations"::false},"codeLens"::{"dynamicRegistration"::true},"formatting"::{"dynamicRegistration"::true},"rangeFormatting"::{"dynamicRegistration"::true},"onTypeFormatting"::{"dynamicRegistration"::true},"rename"::{"dynamicRegistration"::true,"prepareSupport"::true,"prepareSupportDefaultBehavior"::1,"honorsChangeAnnotations"::true},"documentLink"::{"dynamicRegistration"::true,"tooltipSupport"::true},"typeDefinition"::{"dynamicRegistration"::true,"linkSupport"::true},"implementation"::{"dynamicRegistration"::true,"linkSupport"::true},"colorProvider"::{"dynamicRegistration"::true},"foldingRange"::{"dynamicRegistration"::true,"rangeLimit"::5000,"lineFoldingOnly"::true},"declaration"::{"dynamicRegistration"::true,"linkSupport"::true},"selectionRange"::{"dynamicRegistration"::true},"callHierarchy"::{"dynamicRegistration"::true},"semanticTokens"::{"dynamicRegistration"::true,"tokenTypes"::["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers"::["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats"::["relative"],"requests"::{"range"::true,"full"::{"delta"::true}},"multilineTokenSupport"::false,"overlappingTokenSupport"::false},"linkedEditingRange"::{"dynamicRegistration"::true}},"window"::{"showMessage"::{"messageActionItem"::{"additionalPropertiesSupport"::true}},"showDocument"::{"support"::true},"workDoneProgress"::true},"general"::{"regularExpressions"::{"engine"::"ECMAScript","version"::"ES2020"},"markdown"::{"parser"::"marked","version"::"1.1.0"}},"experimental"::{"snippetTextEdit"::true}},"initializationOptions"::{"onlyAnalyzeProjectsWithOpenFiles"::true,"closingLabels"::true,"flutterOutline"::true,"outline"::true,"suggestFromUnimportedLibraries"::true},"trace"::"off","workspaceFolders"::[{"uri"::"file::///Users/rjm/Coding/Tutero/app","name"::"app"}]}}
1635396408134:Res:{"id"::0,"jsonrpc"::"2.0","result"::{"capabilities"::{"executeCommandProvider"::{"commands"::["edit.sortMembers","edit.organizeImports","edit.fixAll","edit.sendWorkspaceEdit","refactor.perform"],"workDoneProgress"::true},"workspaceSymbolProvider"::true,"workspace"::{"workspaceFolders"::{"supported"::true,"changeNotifications"::true}}},"serverInfo"::{"name"::"Dart SDK LSP Analysis Server","version"::"2.14.3"}}}
1635396408154:Req:{"jsonrpc"::"2.0","method"::"initialized","params"::{}}

I should note that this is the full log; and that I attempted to load multiple Dart files in a valid workspace.

Versions (please complete the following information):

  • VS Code version: 1.61.2
  • Dart extension version: master
  • Dart/Flutter SDK version: 2.5.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Oct 28, 2021

The change above has landed in the SDK (and will be included in a future release).

1reaction
DanTupcommented, Oct 28, 2021

I’ve a fix open at https://dart-review.googlesource.com/c/sdk/+/218441/. It’s an SDK change, so after merging will require an updated SDK to take effect unfortunately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure the Windows Firewall to Allow Analysis Services ...
Learn how to configure the Windows Firewall to allow access for SQL Server Analysis Services. Most installations require at least one ...
Read more >
Support for SQL Server Analysis Services in Amazon RDS for ...
Learn about Amazon RDS support for Microsoft SQL Server Analysis Services. ... Instances must use AWS Directory Service for Microsoft Active Directory for ......
Read more >
Optimizing memory settings in Analysis Services - SQLBI
This article describes the memory configuration in SQL Server Analysis Services and Azure Analysis Services. Modifying these settings may ...
Read more >
Analysis Services Service Will Not Start - Support Topics
"The SQL Server Analysis Services (MSSQLSERVER) service on {computer name} started and then stopped. Some services stop automatically if they ...
Read more >
Network analysis services—ArcGIS Server
For more information about working with network analysis layers in ArcGIS Desktop, ... If you will not be copying data to the server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found