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_options.yaml in lib folder breaks auto-import and quick-fixes

See original GitHub issue

Hello, after I upgraded the VS Code plug-in for Flutter and Flutter & Dart, the automatic import and quick repair functions failed!

Before I upgrade, I enter the class name under lib / or the API name exposed in the third-party package will automatically import its file.

For example, if I enter StatelessWidget, multiple options will appear:

-Import from package: flutter / material.dart. -Import from package: flutter / widgets.dart. …

But now there is no response after input! Just prompt me for the correct Class name, but it will no longer be automatically imported after clicking!

Before, when I manually input “StatelessWidget”, for example, after the mouse is placed in the class name position, there will be multiple imported quick fixes! But now it is gone!

** I have n’t made any changes to the settings of the plugin **, it worked fine before, but it no longer works!

This is my plugin settings:

image

As you can see, I have not personalized any settings for Dart & Flutter!

The contents of my .package file are normal:

# Generated by pub on 2020-05-19 15:29:23.374474.
_fe_analyzer_shared:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/_fe_analyzer_shared-3.0.0/lib/
analyzer:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.39.8/lib/
archive:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13/lib/
args:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0/lib/
async:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1/lib/
boolean_selector:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.0.0/lib/
bot_toast:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/bot_toast-3.0.0/lib/
build:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build-1.3.0/lib/
build_config:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build_config-0.4.2/lib/
build_daemon:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build_daemon-2.1.4/lib/
build_resolvers:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.9/lib/
build_runner:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build_runner-1.10.0/lib/
build_runner_core:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/build_runner_core-5.2.0/lib/
built_collection:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/built_collection-4.3.2/lib/
built_value:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/built_value-7.1.0/lib/
built_value_generator:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/built_value_generator-7.1.0/lib/
cached_network_image:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1/lib/
charcode:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3/lib/
checked_yaml:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/checked_yaml-1.0.2/lib/
chewie:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/chewie-0.9.10/lib/
chewie_audio:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/chewie_audio-1.0.0+1/lib/
clock:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1/lib/
code_builder:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/code_builder-3.2.1/lib/
collection:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.12/lib/
convert:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
cookie_jar:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/cookie_jar-1.0.1/lib/
crypto:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4/lib/
css_colors:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/css_colors-1.0.2/lib/
csslib:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.1/lib/
cupertino_icons:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.3/lib/
dart_style:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/dart_style-1.3.6/lib/
dio:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.9/lib/
dio_cookie_manager:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/dio_cookie_manager-1.0.0/lib/
equatable:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/equatable-1.1.1/lib/
file:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/file-5.1.0/lib/
fixnum:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/fixnum-0.10.11/lib/
flutter:file:///Users/seven/Desktop/work/flutter/packages/flutter/lib/
flutter_cache_manager:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.2.2/lib/
flutter_html:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_html-1.0.0/lib/
flutter_localizations:file:///Users/seven/Desktop/work/flutter/packages/flutter_localizations/lib/
flutter_plugin_android_lifecycle:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.7/lib/
flutter_screenutil:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_screenutil-1.1.0/lib/
flutter_staggered_grid_view:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_staggered_grid_view-0.3.0/lib/
flutter_svg:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.17.4/lib/
flutter_test:file:///Users/seven/Desktop/work/flutter/packages/flutter_test/lib/
flutter_web_plugins:file:///Users/seven/Desktop/work/flutter/packages/flutter_web_plugins/lib/
fluwx:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/fluwx-2.1.0/lib/
geolocator:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/geolocator-5.3.1/lib/
glob:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/glob-1.2.0/lib/
google_api_availability:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/google_api_availability-2.0.4/lib/
graphs:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/graphs-0.2.0/lib/
html:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+3/lib/
http:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.1/lib/
http_multi_server:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.2.0/lib/
http_parser:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4/lib/
image:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.12/lib/
image_cropper:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/image_cropper-1.2.2/lib/
image_gallery_saver:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/image_gallery_saver-1.2.2/lib/
image_picker:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.6+1/lib/
image_picker_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/image_picker_platform_interface-1.0.0/lib/
install_plugin:file:///Users/seven/.pub-cache/git/flutter_install_plugin-4244b1ae9002f57c41fc5bae61a17f3ca51685ab/lib/
intl:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/intl-0.16.1/lib/
io:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.4/lib/
jpush_flutter:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/jpush_flutter-0.5.5/lib/
js:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib/
json_annotation:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/json_annotation-3.0.1/lib/
location_permissions:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/location_permissions-2.0.5/lib/
logging:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.4/lib/
matcher:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6/lib/
meta:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8/lib/
mime:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/
multi_image_picker:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/multi_image_picker-4.6.7/lib/
nested:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4/lib/
node_interop:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/node_interop-1.1.1/lib/
node_io:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/node_io-1.1.1/lib/
numeral:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/numeral-1.0.4/lib/
open_iconic_flutter:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/open_iconic_flutter-0.3.0/lib/
package_config:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.9.3/lib/
package_info:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.0+18/lib/
path:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4/lib/
path_drawing:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path_drawing-0.4.1/lib/
path_parsing:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path_parsing-0.1.4/lib/
path_provider:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.8/lib/
path_provider_macos:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+2/lib/
path_provider_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.2/lib/
pedantic:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0/lib/
permission_handler:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-5.0.0+hotfix.6/lib/
permission_handler_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_platform_interface-2.0.0/lib/
petitparser:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/petitparser-2.4.0/lib/
photo_view:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.9.2/lib/
platform:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1/lib/
plugin_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.2/lib/
pool:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0/lib/
provider:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/provider-4.1.2/lib/
pub_semver:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.4/lib/
pubspec_parse:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/pubspec_parse-0.1.5/lib/
pull_to_refresh:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.5.8/lib/
qr:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/qr-1.2.0/lib/
qr_flutter:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/qr_flutter-3.2.0/lib/
quiver:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3/lib/
rxdart:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.24.1/lib/
screen:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/screen-0.0.5/lib/
share:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+2/lib/
shared_preferences:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.7+2/lib/
shared_preferences_macos:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+8/lib/
shared_preferences_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_platform_interface-1.0.4/lib/
shared_preferences_web:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+5/lib/
shelf:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.5/lib/
shelf_web_socket:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3/lib/
sky_engine:file:///Users/seven/Desktop/work/flutter/bin/cache/pkg/sky_engine/lib/
snsmax_localization:file:///Users/seven/.pub-cache/git/snsmax_localization-d283c5b3e1602224d70d9a34bb9903b193011b03/lib/
source_gen:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/source_gen-0.9.5/lib/
source_span:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0/lib/
sqflite:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.0+1/lib/
sqflite_common:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.1/lib/
stack_trace:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
stream_channel:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
stream_transform:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-1.2.0/lib/
string_scanner:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5/lib/
synchronized:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0/lib/
term_glyph:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
test_api:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.15/lib/
timing:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/timing-0.1.1+2/lib/
typed_data:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
url_launcher:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.7/lib/
url_launcher_macos:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+5/lib/
url_launcher_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_platform_interface-1.0.7/lib/
url_launcher_web:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+5/lib/
uuid:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.0.4/lib/
vector_math:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/
video_player:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.11/lib/
video_player_platform_interface:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/video_player_platform_interface-2.0.2/lib/
video_player_web:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-0.1.3/lib/
wakelock:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/wakelock-0.1.4+1/lib/
watcher:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+15/lib/
web_socket_channel:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.1.0/lib/
webview_flutter:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.21/lib/
xml:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/xml-3.6.1/lib/
yaml:file:///Users/seven/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.2.1/lib/
app:lib/

A small video was recorded to watch the current situation:

https://github.com/medz/wtf/blob/master/QQ20200519-171917-HD.mp4

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
medzcommented, May 19, 2020

@DanTup I think I found the problem. I created an analysis_options.yaml file and put it in the lib directory by mistake!

0reactions
scheglovcommented, Jun 17, 2020

If we ignore these extra analysis_options.yaml files in all analyzer tools (DAS and command-line analyzer), then it makes sense to warn the user about this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flutter - analysis_options.yaml the included file not found
I'm using vs code but believe I've seen it in android studio (although I can't reproduce it now). The error: The include file...
Read more >
Diff - sdk - Git at Google - Google Git
+ +#### `dart:core` + +* **Breaking change:** The `RegExp` interface has been ... scalable programming language, with robust -libraries and runtimes, ...
Read more >
GoLand 2021.1 Release Notes | Knowledge Base - YouTrack
Documentation Bug GO‑10751 Go Build Systems Feature GO‑10323 Bug GO‑10496 Go Build and Run Feature GO‑10648
Read more >
Customizing static analysis - Dart
The analysis options file. Place the analysis options file, analysis_options.yaml , at the root of the package, in the same directory as the...
Read more >
Customize Static Analysis - Fart programming language
Place the analysis options file, analysis_options.yaml , at the root of the package, in the same directory as the pubspec file. Breaking change:...
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