dart-lang / test

A library for writing unit tests in Dart.
https://pub.dev/packages/test
497 stars 214 forks source link

malformed type: line 95 pos 36: type 'DelegatingSink' is not loaded #438

Closed scheglov closed 8 years ago

scheglov commented 8 years ago
name: package_config
version: 0.1.4
description: Support for working with Package Resolution config files.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/package_config

environment:
  sdk: '>=1.11.0-dev.0.0 <2.0.0'

dependencies:
  charcode: ^1.1.0
  path: ^1.0.0

dev_dependencies:
  test: '>=0.12.0 <0.13.0'
scheglov@scheglov-macbookpro3:~/dart/package_config (master)$ pub upgrade
Resolving dependencies... (3.3s)
  analyzer 0.26.4 (0.27.3 available)
  args 0.13.4+2
  async 1.11.0
  barback 0.15.2+8
  charcode 1.1.0
  collection 1.8.0
  convert 1.1.1 (2.0.0 available)
  crypto 0.9.2+1 (2.0.1 available)
  csslib 0.13.2
  glob 1.1.2
  html 0.12.2+2 (0.13.0 available)
  http_multi_server 1.3.2 (2.0.1 available)
  http_parser 0.0.2+8 (3.0.1 available)
  logging 0.11.3
  matcher 0.12.0+2
  mime 0.9.3
  path 1.3.9
  plugin 0.1.0 (0.2.0 available)
  pool 1.2.4
  pub_semver 1.2.4
  shelf 0.6.3 (0.6.5+2 available)
  shelf_static 0.2.3+4
  shelf_web_socket 0.0.1+5 (0.2.1 available)
  source_map_stack_trace 1.0.4
  source_maps 0.10.1+1
  source_span 1.2.2
  stack_trace 1.6.5
  string_scanner 0.1.5
  test 0.12.3+9 (0.12.13+4 available)
  typed_data 1.1.3
  utf 0.9.0+3
  watcher 0.9.7+2
  yaml 2.1.9
No dependencies changed.
scheglov@scheglov-macbookpro3:~/dart/package_config (master)$ dart test/all.dart
Unhandled exception:
'package:test/src/runner/engine.dart': malformed type: line 95 pos 36: type 'DelegatingSink' is not loaded
  Sink<Suite> get suiteSink => new DelegatingSink(_suiteController.sink);
nex3 commented 8 years ago

You're using test 0.12.3+9, which was released ten months ago. This is fixed in the latest release.

scheglov commented 8 years ago

Well, apparently there is nothing better than 0.12.3+9. When I attempt to use one of the published version, pub does not allow me.

scheglov@scheglov-macbookpro3:~/dart/package_config (cache-package-to-base-Uri)$ git diff
diff --git a/pubspec.yaml b/pubspec.yaml
index 3d9bd45..e89ab7c 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -12,4 +12,4 @@ dependencies:
   path: ^1.0.0

 dev_dependencies:
-  test: '>=0.12.0 <0.13.0'
+  test: '>=0.12.12 <0.13.0'
scheglov@scheglov-macbookpro3:~/dart/package_config (cache-package-to-base-Uri)$ pub upgrade
Resolving dependencies...
Package test has no versions that match >=0.12.12 <0.13.0 derived from:
- package_config depends on version >=0.12.12 <0.13.0

Even though: image

nex3 commented 8 years ago

You need to determine what other packages' constraints are causing test to be held back to an old version—pub upgrade --verbose is currently the best tool for this.

Please stop re-opening this issue; there's nothing we can do in test to help, and we can continue the discussion when it's closed.

scheglov commented 8 years ago

pub upgrade --verbose looks strange - it does not even try to get the version I ask it for.

IO  : Get versions from https://pub.dartlang.org/api/packages/test.
FINE: HTTP GET https://pub.dartlang.org/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | user-agent: Dart pub 1.18.0-edge.40108f661daf8ddf5b0910d8646421a4fa71c863
FINE: HTTP response 200 OK for GET https://pub.dartlang.org/api/packages/test
    | took 0:00:00.071346
    | date: Tue, 07 Jun 2016 21:05:55 GMT
    | transfer-encoding: chunked
    | content-encoding: gzip
    | x-google-backends: /bns/in/borg/in/bns/apphosting/prod-appengine.appserver/382,inan189.prod.google.com:4192,/bns/ir/borg/ir/bns/apphosting/prod-appengine.edge.frontend/326,isqq132:6599,/bns/is/borg/is/bns/gfe-prod/shared-gfe_47_silos/29.gfe,jcee69:9836
    | x-google-gfe-response-code-details-trace: response_code_set_by_backend,response_code_set_by_backend
    | x-google-gfe-response-body-transformations: chunked
    | server: Google Frontend
    | x-google-gfe-request-trace: jcee69:9836,isqq132:6599,/bns/ir/borg/ir/bns/apphosting/prod-appengine.edge.frontend/326,isqq132:6599,jcee69:9836
    | x-google-gfe-service-trace: apphosting,dasher_zoo_responder,apphosting
    | x-google-gslb-service: apphosting
    | x-frame-options: SAMEORIGIN
    | x-google-dos-service-trace: main:apphosting,dasher:apphosting
    | x-google-gfe-cloud-project-number: 475963186251
    | x-google-appengine-version: 20160331t130247
    | cache-control: private
    | content-type: application/json
    | x-xss-protection: 1; mode=block
    | x-google-service: apphosting,apphosting
    | alt-svc: quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"
    | x-google-gfe-backend-request-info: eid=MzdXV6bGF8WRiQG6nLWICA
    | x-google-netmon-label: /bns/ir/borg/ir/bns/apphosting/prod-appengine.edge.frontend/326
    | x-google-appengine-appid: s~dartlang-pub
    | via: inww135:25644
    | x-content-type-options: nosniff
    | x-google-appengine-module: default
SLVR: * start at root
SLVR: | * select charcode 1.1.0 from hosted
SLVR: | | version 0.12.12 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.11+2 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.11+1 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.11 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.10+2 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.10+1 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.10 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.9 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.8 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.7 of test doesn't match >=0.12.13 <0.13.0:
    | | |   package_config 0.1.5 (root) -> test >=0.12.13 <0.13.0 from hosted (test)
SLVR: | | version 0.12.6+2 of test doesn't match >=0.12.13 <0.13.0:
nex3 commented 8 years ago

Oh, I think I know what's going on here. You're using a 1.18 dev version, so you're getting pushed back to versions of test that (incorrectly) didn't have an upper SDK constraint. We need to release a new version of test; this is tracked by #437.

scheglov commented 8 years ago

Good to know. Thank you!