Skip to content
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

The analyzer_plugin mechanism seems to assume that pub command still exists #48786

Closed
rrousselGit opened this issue Apr 11, 2022 · 3 comments
Closed
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@rrousselGit
Copy link

Trying to start an analyzer_plugin on recent Flutter channels leads to the following error:

ProcessException: No such file or directory
  Command: /Users/remirousselet/dev/flutter/bin/cache/dart-sdk/bin/pub get
#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:465:12)
#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:544: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)

#13     ContextManagerImpl.setRoots (package:analysis_server/src/context_manager.dart:280:5)

#14     LspAnalysisServer._refreshAnalysisRoots (package:analysis_server/src/lsp/lsp_analysis_server.dart:792:5)

#15     LspAnalysisServer.fetchClientConfigurationAndPerformDynamicRegistration (package:analysis_server/src/lsp/lsp_analysis_server.dart:259:11)

#16     LspAnalysisServer.updateWorkspaceFolders (package:analysis_server/src/lsp/lsp_analysis_server.dart:723:5)

#17     IntializedMessageHandler.handle (package:analysis_server/src/lsp/handlers/handler_initialized.dart:36:7)

#18     LspAnalysisServer.handleMessage. (package:analysis_server/src/lsp/lsp_analysis_server.dart:356:26)

As per the error, the problem seems to be that instead of executing dart pub get, the SDK's PluginManager._computeFile (

PluginFiles _computeFiles(Folder pluginFolder,
) is executing pub get instead

Which fails because pub is no-longer a global command

@devoncarew devoncarew added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Apr 11, 2022
@devoncarew
Copy link
Member

Good catch.

Note that we've already branched for the next stable - the about-to-ship-version is the one where the standalone pub tool has been removed. So a fix for this issue should be back-ported to the candidate branch.

@asashour
Copy link
Contributor

Possibly similar to #48682

@devoncarew
Copy link
Member

Thanks - closing as a dup of #48682.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

3 participants