Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: pkg/analysis_server/lib/src/plugin/plugin_locator.dart

Issue 2947153002: Disable finding plugin locations in the pubspec (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/src/plugin/plugin_locator_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/plugin/plugin_locator.dart
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_locator.dart b/pkg/analysis_server/lib/src/plugin/plugin_locator.dart
index 8f9a30c5204dcf34ddc98e998adbf4b38c832392..ba53ab348cba09cc0d54e9fd0ce300ce45dfe84d 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_locator.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_locator.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/file_system/file_system.dart';
-import 'package:yaml/yaml.dart';
/**
* An object used to locate a plugin within a package.
@@ -72,26 +71,29 @@ class PluginLocator {
*/
String _findPlugin(String packageRoot) {
Folder packageFolder = resourceProvider.getFolder(packageRoot);
- File pubspecFile = packageFolder.getChildAssumingFile(pubspecFileName);
- if (pubspecFile.exists) {
- try {
- YamlDocument document = loadYamlDocument(pubspecFile.readAsStringSync(),
- sourceUrl: pubspecFile.toUri());
- YamlNode contents = document.contents;
- if (contents is YamlMap) {
- String pluginPath = contents[analyzerPluginKey];
- if (pluginPath != null) {
- Folder pluginFolder =
- packageFolder.getChildAssumingFolder(pluginPath);
- if (pluginFolder.exists) {
- return pluginFolder.path;
- }
- }
- }
- } catch (exception) {
- // If we can't read the file, or if it isn't valid YAML, then ignore it.
- }
- }
+ // TODO(brianwilkerson) Re-enable this after deciding how we want to deal
+ // with discovery of plugins.
+// import 'package:yaml/yaml.dart';
+// File pubspecFile = packageFolder.getChildAssumingFile(pubspecFileName);
+// if (pubspecFile.exists) {
+// try {
+// YamlDocument document = loadYamlDocument(pubspecFile.readAsStringSync(),
+// sourceUrl: pubspecFile.toUri());
+// YamlNode contents = document.contents;
+// if (contents is YamlMap) {
+// String pluginPath = contents[analyzerPluginKey];
+// if (pluginPath != null) {
+// Folder pluginFolder =
+// packageFolder.getChildAssumingFolder(pluginPath);
+// if (pluginFolder.exists) {
+// return pluginFolder.path;
+// }
+// }
+// }
+// } catch (exception) {
+// // If we can't read the file, or if it isn't valid YAML, then ignore it.
+// }
+// }
Folder pluginFolder = packageFolder
.getChildAssumingFolder(toolsFolderName)
.getChildAssumingFolder(defaultPluginFolderName);
« no previous file with comments | « no previous file | pkg/analysis_server/test/src/plugin/plugin_locator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698