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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1415713002: Ignore contexts in folders named 'packages' or starting with dot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/context_manager_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/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index c6520d52e154df3687146ff7fad46dba6cafa1b4..805a7757530ed30b6f841e7e883e02efb2a28973 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -644,7 +644,7 @@ class ContextManagerImpl implements ContextManager {
}
/**
- * Resursively adds all Dart and HTML files to the [changeSet].
+ * Recursively adds all Dart and HTML files to the [changeSet].
*/
void _addPreviouslyExcludedSources(ContextInfo info, ChangeSet changeSet,
Folder folder, List<String> oldExcludedPaths) {
@@ -691,7 +691,7 @@ class ContextManagerImpl implements ContextManager {
}
/**
- * Resursively adds all Dart and HTML files to the [changeSet].
+ * Recursively adds all Dart and HTML files to the [changeSet].
*/
void _addSourceFiles(ChangeSet changeSet, Folder folder, ContextInfo info) {
if (info.excludesResource(folder) || folder.shortName.startsWith('.')) {
@@ -895,13 +895,16 @@ class ContextManagerImpl implements ContextManager {
*/
void _createContexts(
ContextInfo parent, Folder folder, bool withPackageSpecOnly) {
+ if (folder.shortName.startsWith('.') || folder.shortName == 'packages') {
+ return;
+ }
// Decide whether a context needs to be created for [folder] here, and if
// so, create it.
File packageSpec = _findPackageSpecFile(folder);
bool createContext = packageSpec.exists || !withPackageSpecOnly;
if (withPackageSpecOnly &&
packageSpec.exists &&
- (parent != null) &&
+ parent != null &&
parent.ignored(packageSpec.path)) {
// Don't create a context if the package spec is required and ignored.
createContext = false;
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698