Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was 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

Description

@FMorschel
  • 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions