Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

pub get not finishing #20

Open
marcguilera opened this issue Aug 9, 2018 · 3 comments
Open

pub get not finishing #20

marcguilera opened this issue Aug 9, 2018 · 3 comments

Comments

@marcguilera
Copy link

marcguilera commented Aug 9, 2018

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.

@zoechi
Copy link

zoechi commented Aug 18, 2018

Can you please post the output of dart --version?

@marcguilera
Copy link
Author

Dart VM version: 2.0.0 (Fri Aug 3 10:53:23 2018 +0200) on "macos_x64"

@djwelch
Copy link

djwelch commented Aug 28, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants