eredo / dartson

Dartson is a Dart library that can be used to convert Dart objects into a JSON string.
MIT License
79 stars 29 forks source link

strange interference with polymer #20

Closed hentoesch closed 9 years ago

hentoesch commented 9 years ago

i tried to use dartson with a polymer project. i got into serious troubles just including the dartson lib in pubspec.yaml and running pub get.

my yaml: dependencies: cookie: ">=0.0.4 <0.1.0" polymer: ">=0.16.2 <0.17.0" core_elements: ">=0.7.1+2 <0.8.0" paper_elements: ">=0.7.1 <0.8.0" route_hierarchical: ">=0.6.1+1 <0.7.0" http: ">=0.11.2 <0.12.0" dartson: ">=0.2.2 <0.3.0"

transformers:

1) my app did not start at all and i got the following message:

No elements registered in a while, but still waiting on 7 elements to be registered. Check that you have a class with an @CustomTag annotation for each of the following tags: ...

i could fix this by removing an "enum DataType { ... }" from one of my polymer-element sources.

2) after removing the enum, the app starts but now all of the ...Changed events do not fire anymore.

i did not even import dartson anywhere in the project, just included into the yaml and running pub get. after removing dartson and running pub get again everything works as expected.

the polymer element which seems to be affected is using a core-list-dart element. including dartson in the list of transformers does not make any difference.

eredo commented 9 years ago

Looks like a dependency conflict issue. I'll look into it tomorrow.

eredo commented 9 years ago

Sorry for the delay. The analyzer dependency is updated in 419f28ffa23d5a2d0b2b3204510b8cd417b45228 and now matches the requirement of polymer. Does this resolve your problem?