Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

code_transformers 0.2.9+2 is incompatible with analyzer < 0.26.0 #1736

Open
matdavies opened this issue Aug 20, 2015 · 0 comments
Open

code_transformers 0.2.9+2 is incompatible with analyzer < 0.26.0 #1736

matdavies opened this issue Aug 20, 2015 · 0 comments

Comments

@matdavies
Copy link

code_transformers 0.2.9+2 was released on 19th August and requires analyzer >= 0.26.0, but angular requires analyzer < 0.25.0. A simple dart project with the following pubspec.yaml file fails to build to js:

name: angular_testing
description: A sample web application
dependencies:
  angular: any
  dart_to_js_script_rewriter: any
transformers:
- angular
- dart_to_js_script_rewriter

The exception that occurs is:

Build error:
Transform InjectorGenerator on angular_testing|web/index.dart threw error: <rethrow>
Caused by The null object does not have a getter 'importsAndExports'.

NoSuchMethodError: method not found: 'importsAndExports'
Receiver: null
Arguments: []
#0      AnalysisTask._safelyPerform (package:analyzer/src/generated/engine.dart:6434:7)
#1      AnalysisTask.perform (package:analyzer/src/generated/engine.dart:6403:7)
#2      AnalysisContextImpl._cacheDartResolutionData (package:analyzer/src/generated/engine.dart:2804:12)
#3      AnalysisContextImpl._getDartResolutionData (package:analyzer/src/generated/engine.dart:3413:17)
#4      AnalysisContextImpl._getDartResolutionData2 (package:analyzer/src/generated/engine.dart:3442:14)
#5      AnalysisContextImpl.computeLibraryElement (package:analyzer/src/generated/engine.dart:1692:7)
#6      ResolverImpl._performResolve.<anonymous closure>.<anonymous closure> (package:code_transformers/src/resolver_impl.dart:157:25)
#7      MappedListIterable.elementAt (dart:_internal/iterable.dart:413)
#8      ListIterable.toList (dart:_internal/iterable.dart:219)
#9      ResolverImpl._performResolve.<anonymous closure> (package:code_transformers/src/resolver_impl.dart:158:10)
#10     _RootZone.runUnary (dart:async/zone.dart:1166)
#11     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)
#12     _Future._propagateToListeners (dart:async/future_impl.dart:577)
#13     _Future._completeWithValue (dart:async/future_impl.dart:368)
#14     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)
#15     _microtaskLoop (dart:async/schedule_microtask.dart:43)
#16     _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#17     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

Caused by The null object does not have a getter 'importsAndExports'.

NoSuchMethodError: method not found: 'importsAndExports'
Receiver: null
Arguments: []
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2      LibraryResolver._addToDependencyMap (package:analyzer/src/generated/resolver.dart:7981:49)
#3      LibraryResolver._addToDependencyMap (package:analyzer/src/generated/resolver.dart:7993:9)
#4      LibraryResolver._computeDependencyMap (package:analyzer/src/generated/resolver.dart:8256:5)
#5      LibraryResolver._computeLibrariesInCycles (package:analyzer/src/generated/resolver.dart:8299:9)
#6      LibraryResolver.resolveLibrary (package:analyzer/src/generated/resolver.dart:7861:26)
#7      ResolveDartLibraryTask.internalPerform (package:analyzer/src/generated/engine.dart:10538:15)
#8      AnalysisTask._safelyPerform (package:analyzer/src/generated/engine.dart:6430:7)
#9      AnalysisTask.perform (package:analyzer/src/generated/engine.dart:6403:7)
#10     AnalysisContextImpl._cacheDartResolutionData (package:analyzer/src/generated/engine.dart:2804:12)
#11     AnalysisContextImpl._getDartResolutionData (package:analyzer/src/generated/engine.dart:3413:17)
#12     AnalysisContextImpl._getDartResolutionData2 (package:analyzer/src/generated/engine.dart:3442:14)
#13     AnalysisContextImpl.computeLibraryElement (package:analyzer/src/generated/engine.dart:1692:7)
#14     ResolverImpl._performResolve.<anonymous closure>.<anonymous closure> (package:code_transformers/src/resolver_impl.dart:157:25)
#15     MappedListIterable.elementAt (dart:_internal/iterable.dart:413)
#16     ListIterable.toList (dart:_internal/iterable.dart:219)
#17     ResolverImpl._performResolve.<anonymous closure> (package:code_transformers/src/resolver_impl.dart:158:10)
#18     _RootZone.runUnary (dart:async/zone.dart:1166)
#19     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)
#20     _Future._propagateToListeners (dart:async/future_impl.dart:577)
#21     _Future._completeWithValue (dart:async/future_impl.dart:368)
#22     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:43)
#24     _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#25     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

This can be fixed by adding the following to pubspec.yaml:

dependency_overrides:
  code_transformers: 0.2.9

Not sure if this is an issue for AngularDart or for code_transformers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant