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

'lastName' does not exist in loader.dart #549

Closed pjjjv closed 9 years ago

pjjjv commented 9 years ago

When I use polymer 0.16.3+3 instead of polymer 0.16.3+1, I run into a bug in .pub-cache/hosted/pub.dartlang.org/polymer-0.16.3+3/lib/src/loader.dart . On line 127, 'lastName' cannot be found, because the member does not exist in Logger. It seems this bit of code should be more like (with 'fullName' instead of 'lastName'):

// If no loggers specified then disable globally and return. if (!loggers.any((logger) => logFlags[logger.fullName] == true)) { polymerLogger.level = Level.OFF; return; }

// Disable the loggers that were not specified. loggers.where((logger) => logFlags[logger.fullName] != true).forEach((logger) { logger.level = Level.OFF; });

My project: https://github.com/pjjjv/Akepot

jakemac53 commented 9 years ago

A bit confused.... if I look in the codebase it uses name not lastName https://github.com/dart-lang/polymer-dart/blob/d2233b982ad8fcbf1722ed4aee63fc91ddb56c7f/lib/src/loader.dart#L127. Is it possible that you did a find/replace or something on the whole project which changed this even though it was in your packages dir?

pjjjv commented 9 years ago

Yes, you're right! I thought it was a refactoring-run-amock myself at first. I then removed the 'packages' folders in Dart Editor and did a pub get, but that was not enough it seems now. Apparently when I switched versions I downloaded a new clean version. No idea how I managed to do such a wide scoped rename action in Dart Editor. I have now learned to use 'pub cache repair'. Sorry, I should have checked the upstream codebase.

sigmundch commented 9 years ago

/cc @danrubel @scheglov

I recall the editor used to have this bug that it would try to apply refactoring changes not just in your code, but also in packages you use. For some reason I thought that has been fixed.

scheglov commented 9 years ago

Yes, there was such bug in one the Editor versions. If was fixed long ago though.

I've tested it now by renaming a function from "package:path" and see that the changes are applied only to in-project clients, but not to the path package itself.

What version of Editor do you use?

pjjjv commented 9 years ago

Dart Editor 1.9.1. However the refactoring might have gone wrong earlier, perhaps even a few months ago.

sigmundch schreef op ma 03-08-2015 om 08:49 [-0700]:

/cc @danrubel @scheglov

I recall the editor used to have this bug that it would try to apply refactoring changes not just in your code, but also in packages you use. For some reason I thought that has been fixed.

— Reply to this email directly or view it on GitHub.

Pieter-Jan Vandormael