dart-archive / pub_server

Reusable components for making a pub package server
https://pub.dev/packages/pub_server
BSD 3-Clause "New" or "Revised" License
220 stars 84 forks source link

Fixed type cast error #28

Closed riccardoratta closed 5 years ago

riccardoratta commented 5 years ago

When running the example repository on dart 2.0.0 I always get:

Asynchronous error
type 'List<dynamic>' is not a subtype of type 'List<Map<dynamic, dynamic>>' in type cast
dart:core                                              Object._as
example/src/examples/http_proxy_repository.dart 31:37  HttpProxyRepository.versions
===== asynchronous gap ===========================
example/src/examples/cow_repository.dart 135:18        _RemoteMetadataCache.fetchVersionlist.<fn>
dart:collection                                        __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent
example/src/examples/cow_repository.dart 131:10        _RemoteMetadataCache.fetchVersionlist
example/src/examples/cow_repository.dart 47:35         CopyAndWriteRepository.versions.onListen
dart:async                                             Stream.toList
package:pub_server/shelf_pubserver.dart 242:62         ShelfPubServer._listVersions

The change proposed fixed the problem.

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers