dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
181 stars 33 forks source link

reflectable 0.5.0 and initilize 0.6.2 #672

Closed rbishop-bah closed 8 years ago

rbishop-bah commented 8 years ago

Attempting to upgrade to reflectable 0.5.0, pub upgrade warns: Error on line 1, column 1 of https://pub.dartlang.org/api/packages/initialize: Invalid description: "test_package" is a relative path, but this isn't a local pubspec.

And then pub serve does not work.

Reverting reflectable to 0.4.0 (and consequently initialize to 0.6.1+2) restores functionality.

Seems to be related to the switch from unittest to test somehow in initialize.

jakemac53 commented 8 years ago

Ya this is a pub bug, it has since been fixed but not sure when it will be released https://github.com/dart-lang/pub/issues/1369

jakemac53 commented 8 years ago

fwiw if you just delete your .pub directory after doing a pub upgrade, and then re-run pub upgrade everything should be fine.

rbishop-bah commented 8 years ago

Thanks. I got the warning message to go away but still no luck with pub serve. I'll just wait for the pub fix.

jakemac53 commented 8 years ago

ok, it definitely is possible to get it working though so if this is blocking you then let me know

zoechi commented 8 years ago

AFAIR I still got the error but it was working anyway.

eernstg commented 8 years ago

There is one thing which is useful to know here, and I haven't spotted whether you have taken it into account already.

Version 0.5.0 of reflectable specifies analyzer version ^0.27.0, which was fine at the time (because 0.27.1 had been released, and it worked). However, soon after 0.27.1 was released there was another update to 0.27.1+1, which again has the issue that prevented us from using the analyzer versions 0.26.1+15 .. 0.27.0 (compile time values of many constants appear to be null, which causes the transformation to produce an effectively empty output). Version 0.5.1 forced the analyzer version to be precisely 0.27.1.

So if you insist on reflectable 0.5.0 you may experience the problem that reflectable transformation produces a result that will not work (as soon as you start using reflectable features in your program, you will see various kinds of "not found" problems, which might technically amount to null errors). The fix would be to use reflectable version ^0.5.1 (or ^0.5.0, except that this might mask a conflict where you still get 0.5.0 rather than 0.5.1, because some other package insists on 0.5.0).