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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 921213002: Visit async and core library dependencies when computing library cycles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | tests/lib/analyzer/analyze_library.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index adcc7409246aabf4269979ed6e4beaec2d2d6fb3..70a80bfb0674246533603108496ebd815dc24efe 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -7911,36 +7911,18 @@ class LibraryResolver {
*/
LibraryElement resolveLibrary(Source librarySource, bool fullAnalysis) {
//
- // Create the objects representing the library being resolved and the core
- // library.
+ // Create the object representing the library being resolved and compute
+ // the dependency relationship. Note that all libraries depend implicitly
+ // on core, and we inject an ersatz dependency on async, so once this is
Brian Wilkerson 2015/02/13 17:32:26 Is it really necessary to inject a dependency on d
+ // done the core and async library elements will have been created.
//
Library targetLibrary = createLibrary(librarySource);
+ _computeLibraryDependencies(targetLibrary);
_coreLibrary = _libraryMap[_coreLibrarySource];
- if (_coreLibrary == null) {
- // This should only happen if the library being analyzed is the core
- // library.
- _coreLibrary = _createLibraryOrNull(_coreLibrarySource);
- if (_coreLibrary == null) {
- LibraryResolver2.missingCoreLibrary(
- analysisContext,
- _coreLibrarySource);
- }
- }
_asyncLibrary = _libraryMap[_asyncLibrarySource];
- if (_asyncLibrary == null) {
- // This should only happen if the library being analyzed is the async
- // library.
- _asyncLibrary = _createLibraryOrNull(_asyncLibrarySource);
- if (_asyncLibrary == null) {
- LibraryResolver2.missingAsyncLibrary(
- analysisContext,
- _asyncLibrarySource);
- }
- }
//
// Compute the set of libraries that need to be resolved together.
//
- _computeLibraryDependencies(targetLibrary);
_librariesInCycles = _computeLibrariesInCycles(targetLibrary);
//
// Build the element models representing the libraries being resolved.
« no previous file with comments | « no previous file | tests/lib/analyzer/analyze_library.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698