颤振 - 查看 .pub-cache 文件导致请求 textDocument/documentSymbol 失败 [英] flutter - viewing .pub-cache files gives Request textDocument/documentSymbol failed

查看:59
本文介绍了颤振 - 查看 .pub-cache 文件导致请求 textDocument/documentSymbol 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每次查看第三方 flutter 包的代码(在 .pub-cache 文件夹中)时都会收到这些错误消息:

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?

我尝试将 settings.json dart sdk 设置从 null 更改为我的 dart sdk 位置:"dart.sdkPath":"/usr/local/opt/dart/libexec",但它没有用.

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.

推荐答案

这是一个错误(参见 https://github.com/Dart-Code/Dart-Code/issues/2764) 使用 LSP 预览时.已经修复,虽然修复可能还没有达到 Flutter 的稳定版本.

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.

这篇关于颤振 - 查看 .pub-cache 文件导致请求 textDocument/documentSymbol 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆