dart-archive / angular.dart.tutorial

AngularDart tutorial
MIT License
234 stars 89 forks source link

Can't run generator.dart #105

Closed jamcoupe closed 10 years ago

jamcoupe commented 10 years ago

Whenever I try running 'dart -c bin/generator.dart' I get this error.

entryPoint: web/main.dart
classAnnotations: angular.core.NgComponent, angular.core.NgController, angular.core.NgDirective, angular.core.NgFilter, injectable.InjectableService, angular.core.service.NgInjectableService
output: web/di_factories_gen.dart
packageRoots: [packages]
Unhandled exception:
The null object does not have a getter 'context'.

NoSuchMethodError : method not found: 'context'
Receiver: null
Arguments: []
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#1      SourceCrawler.crawl (package:di/generator.dart:244:9)
#2      generateCode (package:di/generator.dart:51:10)
#3      main (package:di/generator.dart:34:26)
#4      _runDiGenerator (file:///Users/../http/angular.dart.tutorial/Chapter_07/bin/generator.dart:36:20)
#5      main (file:///Users/../http/angular.dart.tutorial/Chapter_07/bin/generator.dart:22:18)
#6      _startIsolate.isolateStartHandler (dart:isolate-patch/isolate_patch.dart:216)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:115)
kwalrath commented 10 years ago

@chalin or @vicb does this sound familiar?

chalin commented 10 years ago

Doesn't ring a bell. Will check it out as soon as I can.

kwalrath commented 10 years ago

Thanks very much, Patrice.

bgourlie commented 10 years ago

A lot of code generation stuff appears to have changed in 0.9.9. The template_cache_generator appears to be inherently broken (see https://github.com/angular/angular.dart/issues/750).

Also, something has changed with the way the StaticParser is to be configured (See http://stackoverflow.com/questions/22488440/what-do-i-do-with-the-file-created-by-the-expression-generator-as-of-angular-dar)

mrteera commented 10 years ago

I've got the similar error.

entryPoint: web/main.dart
classAnnotations: angular.core.NgComponent, angular.core.NgController, angular.core.NgDirective, angular.core.NgFilter, injectable.InjectableService, angular.core.service.NgInjectableService
output: web/di_factories_gen.dart
packageRoots: [packages]
Unhandled exception:
type '_LinkedHashSet<String>' is not a subtype of type 'List<String>' of 'exprs'.
#0      ParserGetterSetter.generateParser (package:angular/tools/parser_getter_setter/generator.dart:37:31)
#1      main.<anonymous closure> (package:angular/tools/expression_extractor.dart:66:52)
#2      _rootRun (dart:async/zone.dart:710)
#3      _rootRun (dart:async/zone.dart:711)
#4      _rootRun (dart:async/zone.dart:711)
#5      _ZoneDelegate.run (dart:async/zone.dart:440)
#6      _CustomizedZone.run (dart:async/zone.dart:650)
#7      runZoned (dart:async/zone.dart:944)
#8      main (package:angular/tools/expression_extractor.dart:64:11)
#9      _runNgGenerator (file:///home/../Chapter_07/bin/generator.dart:50:20)
#10     main (file:///home/../Chapter_07/bin/generator.dart:30:18)
#11     _startIsolate.isolateStartHandler (dart:isolate-patch/isolate_patch.dart:216)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:115)
kwalrath commented 10 years ago

I'm getting a similar error.

kwalrath commented 10 years ago

@pavelgj do we even need the generator now? "Now" meaning 0.9.10 or any subsequent release?

pavelgj commented 10 years ago

Guess not. Should switch to transformers.

kwalrath commented 10 years ago

I'll update the page to say that it's going to change very soon.

kwalrath commented 10 years ago

Page updated, and new text is ready to go once 0.9.11 is out.