Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

[BUG] The specified file can not be found. Command: C:\src\flutter\bin\cache\dart-sdk\bin\pub.bat upgrade #851

Closed
FMorschel opened this issue May 16, 2022 · 3 comments
Assignees

Comments

@FMorschel
Copy link

FMorschel commented May 16, 2022

  • Dart code metrics version: 4.15.0
  • Dart sdk version: 2.17.0

Please show your full configuration:

Configuration
include: package:flutter_lints/flutter.yaml

analyzer:
  plugins:
    - dart_code_metrics
  errors:
    missing_required_param: error

dart_code_metrics:
  rules:
    - double-literal-format
    - format-comment
    - member-ordering-extended:
        alphabetize: true
        order:
          - constructors
          - public-fields
          - private-fields
          - getters-setters
          - public-methods
          - private-methods
    - no-equal-arguments: 
        ignored-parameters:
          - height
          - width
    - prefer-commenting-analyzer-ignores
    - prefer-first
    - prefer-immediate-return
    - prefer-last

    - always-remove-listener
    - avoid-border-all
    - avoid-returning-widgets:
        ignored-names:
          - testFunction
        ignored-annotations:
          - allowedAnnotation
    - avoid-unnecessary-setstate
    - avoid-wrapping-in-padding
    - prefer-const-border-radius
    - prefer-extracting-callbacks:
        ignored-named-arguments:
          - onPressed

I just followed the instructions to run the package with VSCode Analyzer and it didn't work. I tried to restart the Analysis Server, run flutter clean and pub get again, but nothing really did anything.

What did you expect to happen?
See the lint warnings and infos.

What actually happened?
Nothing.
Then I opened Analyzer Diagnostics, over plugin, I found:
image

I looked at dart-sdk/bin folder and this is what I have:
image

Exception
ProcessException: The specified file can not be found.

  Command: C:\src\flutter\bin\cache\dart-sdk\bin\pub.bat upgrade
#0      _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:487:7)
#1      _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:632:18)
#2      Process.runSync (dart:io-patch/process_patch.dart:68:12)
#3      PluginManager._computeFiles (package:analysis_server/src/plugin/plugin_manager.dart:641:28)
#4      PluginManager.filesFor (package:analysis_server/src/plugin/plugin_manager.dart:462:14)
#5      PluginManager.addPluginToContextRoot (package:analysis_server/src/plugin/plugin_manager.dart:328:23)
#6      PluginWatcher.addedDriver (package:analysis_server/src/plugin/plugin_watcher.dart:68:19)
#7      AnalysisDriver.configure (package:analyzer/src/dart/analysis/driver.dart:555:33)
#8      ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:137:12)
#9      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:67:36)
#10     ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded.performContextRebuild (package:analysis_server/src/context_manager.dart:449:40)
#11     ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded.performContextRebuild (package:analysis_server/src/context_manager.dart:444:41)
#12     ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded (package:analysis_server/src/context_manager.dart:562:17)

Basic Analysis Server status

image

Are you willing to submit a pull request to fix this bug?
I'm not qualified for this.

@dkrutskikh
Copy link
Member

@FMorschel please read our Know Issues #568

@incendial
Copy link
Member

incendial commented May 16, 2022

Should be fixed when this fix dart-lang/sdk#48682 will be cherry-picked to stable, please follow the discussion in this issue

@incendial
Copy link
Member

Updating to Flutter 3.0.1 should fix the issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants