Skip to content

Analysis server doesn't work correctly if a workspace folder/analysis root does not exist #54116

@DanTup

Description

@DanTup

After pulling latest changes in the SDK, the analysis server didn't work correctly when working on the SDK code. Every request returned:

1700565754126:Res:{"id"::5,"jsonrpc"::"2.0","error"::{"code"::-32007,"data"::"C::\\Dev\\Google\\dart-sdk\\sdk\\pkg\\analysis_server\\lib\\src\\analysis_server.dart","message"::"File is not being analyzed"}}

It seems like this is being triggered by having nnbd_migration in my .code-workspace file (that folder was recently deleted). My guess is that something is going wrong during initialisation that results in no analysis roots being set if one of them does not exist.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ondevexp-serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions