flutter - viewing .pub-cache files gives Request textDocument/documentSymbol failed
·
Answer a question
I get these error messages every time I view the code of third party flutter packages (in .pub-cache folder):
[Error - 7:19:24 PM] Request textDocument/documentSymbol failed.
Message: Invalid file path
Code: -32003
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:24 PM] Request textDocument/codeAction failed.
Message: Invalid file path
Code: -32003
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:24 PM] Request textDocument/hover failed.
Message: Invalid file path
Code: -32003
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:25 PM] Request textDocument/hover failed.
Message: Invalid file path
Code: -32003
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
[Error - 7:19:33 PM] Request textDocument/hover failed.
Message: Invalid file path
Code: -32003
/Users/benjaminfarquhar/development/flutter/.pub-cache/hosted/pub.dartlang.org/hive-1.4.4+1/lib/src/hive_impl.dart
I didn't use to get them. Any ideas on how to fix?
I have tried changing the settings.json dart sdk setting from null to my dart sdk location: "dart.sdkPath": "/usr/local/opt/dart/libexec", but it didn't work.
Answers
This was a bug (see https://github.com/Dart-Code/Dart-Code/issues/2764) when using the LSP Preview. It's been fixed, although the fix might not have reached the stable version of Flutter yet.
更多推荐
所有评论(0)