pub get not finishing
Great job on this one! I'm trying out this server using the original example. I was able to push a library A without a problem but when calling pub get from library B which depends on A it simply never finishes the resolving packages stage. This is due to the following exception:
ERROR - 2018-08-09 23:53:30.287675
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 33: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 244:62 ShelfPubServer._listVersions
PS: Is there any plan to replicate all pub.dartlang.org functionality eventually? Including serving a website to browse packages, version, and documentation.
Can you please post the output of dart --version?
Dart VM version: 2.0.0 (Fri Aug 3 10:53:23 2018 +0200) on "macos_x64"
You've got to change the line that is a cast using List<Map> to a cast using List<dynamic>. It's line 33 of http_proxy_repository for the example code. At least that's what I did and it now appears to be fine.