-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter projects are excluded if analysis_options exclusions begin with /** #4083
Comments
Can you open this project and then run the Dart: Open Extension Log and provide the log here (be sure to remove anything sensitive first)? Thanks! |
Can you also attach the |
Hi @DanTup, thanks for faster replay pubspec.yamlname: private_project
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.1+1
environment:
sdk: ">=2.17.5 <3.0.0"
flutter: ">=3.0.0"
dependencies:
auto_route: 4.2.0
cupertino_icons: 1.0.5
easy_localization: 3.0.1
faker_dart: 0.1.6
flutter:
sdk: flutter
flutter_form_builder: 7.4.0
flutter_riverpod: 2.0.0-dev.9
flutter_svg: 1.1.1+1
freezed_annotation: 2.0.3
injectable: 1.5.3
intl: 0.17.0
json_annotation: 4.6.0
get_it: 7.2.0
riverpod: 2.0.0-dev.9
dev_dependencies:
auto_route_generator: 4.2.0
build_runner: 2.1.11
flutter_lints: 2.0.1
flutter_test:
sdk: flutter
freezed: 2.0.4
index_generator: 3.3.0
injectable_generator: 1.5.3
json_serializable: 6.3.1
dependency_overrides:
analyzer: 4.2.0
flutter:
uses-material-design: true
assets:
... The only replace that I made, was the string Extension log!! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 3.46.0
Flutter extension: 3.46.0 (not activated)
App: Visual Studio Code
Version: 1.69.2
Platform: mac
HTTP_PROXY: undefined
NO_PROXY: undefined
Logging Categories:
General
Wed Aug 03 2022 [12:12:39 GMT+0200 (Central European Summer Time)] Log file started
[12:12:39 PM] [General] [Info] Searching for SDKs...
[12:12:39 PM] [General] [Info] Environment PATH:
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/sbin
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/bin
[12:12:39 PM] [General] [Info] /Users/matias/.nvm/versions/node/v16.8.0/bin
[12:12:39 PM] [General] [Info] /Applications/Android Studio.app/Contents/jre/Contents/Home//bin
[12:12:39 PM] [General] [Info] /usr/local/bin
[12:12:39 PM] [General] [Info] /usr/bin
[12:12:39 PM] [General] [Info] /bin
[12:12:39 PM] [General] [Info] /usr/sbin
[12:12:39 PM] [General] [Info] /sbin
[12:12:39 PM] [General] [Info] /Library/Apple/usr/bin
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/tools
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/platform-tools
[12:12:39 PM] [General] [Info] /Users/matias/.pub-cache/bin
[12:12:39 PM] [General] [Info] Took 336ms to search for projects (5 levels)
[12:12:39 PM] [General] [Info] Took 4ms to filter out excluded projects (6 exclusion rules)
[12:12:39 PM] [General] [Info] Searching for flutter
[12:12:39 PM] [General] [Info] Looking for flutter in:
[12:12:39 PM] [General] [Info] /private/var/mrmilu/private.project/.fvm/flutter_sdk
[12:12:39 PM] [General] [Info] /private/var/mrmilu/private.project/.fvm/flutter_sdk/bin
[12:12:39 PM] [General] [Info] /Users/matias/flutter-sdk
[12:12:39 PM] [General] [Info] /Users/matias/flutter-sdk/bin
[12:12:39 PM] [General] [Info] /google/flutter
[12:12:39 PM] [General] [Info] /google/flutter/bin
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/sbin
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/bin
[12:12:39 PM] [General] [Info] /Users/matias/.nvm/versions/node/v16.8.0/bin
[12:12:39 PM] [General] [Info] /Applications/Android Studio.app/Contents/jre/Contents/Home//bin
[12:12:39 PM] [General] [Info] /usr/local/bin
[12:12:39 PM] [General] [Info] /usr/bin
[12:12:39 PM] [General] [Info] /bin
[12:12:39 PM] [General] [Info] /usr/sbin
[12:12:39 PM] [General] [Info] /sbin
[12:12:39 PM] [General] [Info] /Library/Apple/usr/bin
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/tools
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/tools/bin
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/platform-tools
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/platform-tools/bin
[12:12:39 PM] [General] [Info] /Users/matias/.pub-cache/bin
[12:12:39 PM] [General] [Info] Found at:
[12:12:39 PM] [General] [Info] /private/var/mrmilu/private.project/.fvm/flutter_sdk/bin
[12:12:39 PM] [General] [Info] Following symlink: /private/var/mrmilu/private.project/.fvm/flutter_sdk/bin/flutter ==> /Users/matias/fvm/versions/3.0.5/bin/flutter
[12:12:39 PM] [General] [Info] Candidate paths to be post-filtered:
[12:12:39 PM] [General] [Info] /Users/matias/fvm/versions/3.0.5
[12:12:39 PM] [General] [Info] Found at /Users/matias/fvm/versions/3.0.5
[12:12:39 PM] [General] [Info] Returning SDK path /Users/matias/fvm/versions/3.0.5 for flutter
[12:12:39 PM] [General] [Info] Searching for dart
[12:12:39 PM] [General] [Info] Looking for dart in:
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/sbin
[12:12:39 PM] [General] [Info] /usr/local/opt/php@7.4/bin
[12:12:39 PM] [General] [Info] /Users/matias/.nvm/versions/node/v16.8.0/bin
[12:12:39 PM] [General] [Info] /Applications/Android Studio.app/Contents/jre/Contents/Home//bin
[12:12:39 PM] [General] [Info] /usr/local/bin
[12:12:39 PM] [General] [Info] /usr/bin
[12:12:39 PM] [General] [Info] /bin
[12:12:39 PM] [General] [Info] /usr/sbin
[12:12:39 PM] [General] [Info] /sbin
[12:12:39 PM] [General] [Info] /Library/Apple/usr/bin
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/tools
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/tools/bin
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/platform-tools
[12:12:39 PM] [General] [Info] /Users/matias/Library/Android/sdk/platform-tools/bin
[12:12:39 PM] [General] [Info] /Users/matias/.pub-cache/bin
[12:12:39 PM] [General] [Info] /Users/matias/fvm/versions/3.0.5/bin/cache/dart-sdk
[12:12:39 PM] [General] [Info] /Users/matias/fvm/versions/3.0.5/bin/cache/dart-sdk/bin
[12:12:39 PM] [General] [Info] Found at:
[12:12:39 PM] [General] [Info] /usr/local/bin
[12:12:39 PM] [General] [Info] /Users/matias/fvm/versions/3.0.5/bin/cache/dart-sdk/bin
[12:12:39 PM] [General] [Info] Following symlink: /usr/local/bin/dart ==> /usr/local/Cellar/dart/2.17.6/libexec/bin/dart
[12:12:39 PM] [General] [Info] Candidate paths to be post-filtered:
[12:12:39 PM] [General] [Info] /usr/local/Cellar/dart/2.17.6/libexec
[12:12:39 PM] [General] [Info] /Users/matias/fvm/versions/3.0.5/bin/cache/dart-sdk
[12:12:39 PM] [General] [Info] Found at /usr/local/Cellar/dart/2.17.6/libexec
[12:12:39 PM] [General] [Info] Returning SDK path /usr/local/Cellar/dart/2.17.6/libexec for dart
[12:12:39 PM] [General] [Info] !! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 3.46.0
Flutter extension: 3.46.0 (not activated)
App: Visual Studio Code
Version: 1.69.2
Platform: mac
Workspace type: Dart
Analyzer type: LSP
Multi-root?: false
Dart SDK:
Loc: /usr/local/Cellar/dart/2.17.6/libexec
Ver: 2.17.6
Flutter SDK:
Loc: /Users/matias/fvm/versions/3.0.5
Ver: 3.0.5
HTTP_PROXY: undefined
NO_PROXY: undefined
[12:12:39 PM] [General] [Info] Returning cached results for project search
[12:12:39 PM] [General] [Info] Extension:Startup timing: 457ms
[12:12:39 PM] [General] [Info] Found 0 folders requiring "pub get":
[12:12:39 PM] [General] [Info] Caching Pub package names from pub.dev...
[12:12:40 PM] [General] [Info] Analyzer:Startup timing: 743ms
[12:12:40 PM] [General] [Info] Returning cached results for project search
[12:12:44 PM] [General] [Info] Analyzer:FirstAnalysis timing: 3367ms |
Can you confirm which folder(s) you're opening in VS Code, and where the The log suggests either we didn't find any Flutter projects (that is, we didn't see |
I used this project folder: My analysis_options.yamlinclude: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- lib/**/*.g.dart
- lib/**/*.config.dart
- test/**/*.mocks.dart
- /**/generated/*
- lib/**/*.freezed.dart
- lib/generated_plugin_registrant.dart
linter:
rules:
- unnecessary_parenthesis
- prefer_single_quotes
- prefer_relative_imports
- require_trailing_commas
|
Ah, thanks! The issue is this:
The code we're using to handle these exclusions is naive and not handling this ** correctly (we're ignoring everything after the
Not having the leading slash prevents us from interpreting this rule, so it should prevent the project being excluded. |
Nice catch! I change Thanks a lot for help |
Re-opening this as I'm going to ship a better fix that doesn't handle |
A better fix shipped in v3.46.1. |
Describe the bug
When update to version 3.46.0 and has a FVM config in my machine, the Dart Code extension only found a Dart SDK from FVM and don't found a Flutter SDK
To Reproduce
Steps to reproduce the behavior:
0. Has installed a FVM
Expected behavior
Found Flutter SDK when has a Flutter project and a FVM config
Screenshots
When open one file in this Flutter project, show me this instead Flutter 3.0.5:
Please complete the following information:
VS Code config (only related to Dart Code extension):
The text was updated successfully, but these errors were encountered: